Do you have a connection string I can use to connect to the local MSSQL database?


Yes. Please use the following connection string and fill in the necessary spots with your database's information:

DBNAME is what you specified as your database name in the control panel
DBUSERNAME is the username you created to connect to the database (and was associated with the database in the control panel)
DBPASSWORD is the password you associated with the username above

An example script:

<%@ Import Namespace="System.Data.SqlClient" %>
<%
Dim conn As SqlConnection
Dim sqlQuery As SqlCommand
Dim dtrTbl As SqlDataReader
conn = New SqlConnection( "Server=localhost\sqlexpress;uid=USERNAME;pwd=PASSWORD;database=DBID" )
conn.Open()
sqlQuery = New SqlCommand( "Select COLLUMN_NAME From TABLE_NAME", condDBID)
dtrTbl = sqlQuery.ExecuteReader()
While dtrTbl.Read()
Response.Write(“<|i>" )
Response.Write(dtrTbl( "COLUMN_NAME" ) )
End While
dtrTbl.Close()
conn.Close()
%>
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

I am receiving System.Security.SecurityException or That assembly does not allow partially trusted callers.

When running your application you may see: That assembly does not allow...

How can I redirect one URL to another on ASP .NET?

Our ASP plans have the following installed:...

Cryptography with ASP .NET

A customer received the following error when attempting to create a RSACryptoServiceProvider from...

I am getting a 404 error on the secondary pages of my MVC application. Why?

To resolve the 404 error issues on secondary pages of a ASP .NET MVC applications, you will need...

My site is showing the following error: HTTP Error 503. The service is unavailable.

The error HTTP Error 503. The service is unavailable. generally means that your application pool...