<add name="strConn" connectionString="Data Source=localhost;Initial Catalog=DBNAME;Integrated Security=false;User ID=DBUSERNAME;Password=DBPASSWORD" />
In some instances, the "Data Source" will need to have the Instance Name after it(\sqlexpress), such as this:
<add name="strConn" connectionString="Data Source=localhost\sqlexpress;Initial Catalog=DBNAME;Integrated Security=false;User ID=DBUSERNAME;Password=DBPASSWORD" />
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(œ<li>" )
Response.Write(dtrTbl( "COLUMN_NAME" ) )
End While
dtrTbl.Close()
conn.Close()
%>
Categories
36
Advanced
1 Business Cloud Solutions
11 Client Area
7 cPanel
18 Databases
57 Deleted .SS Domains
8 DNS (Name Servers)
34 Domains
50 Email Programs
6 Files
20 FTP Programs
1 Google
2 Hosting Record How-to
0 How Can Your Website Deliver a Better User Experience?
3 Installing Software
8 Introduction to Web Hosting
23 Joomla
3 Logs
1 Payments
13 phpMyAdmin
14 Resellers
729 Resources
17 Security
1 Servers
4 Services and Programs
0 SiteBuilder
9 SiteBuilder Emails
16 Softaculous
3 SSL Certificates
0 Terms of Service
17 Transfers
6 TroubleShooting
2 uploading
3 Using my Browser
1 Web Hosting Glossary
7 Website Builder
1 Where do I go ?
2 Windows Hosting
21 WordPress
Categories
- 1 Users Found This Useful
Related Articles
Managing MySQL Databases With PHPMyAdmin Tanzania
Let's learn how to Manage MySQL Databases with phpMyAdmin. This tutorial will assume that you are...
How To Create A MySQL Database Tanzania
Let's learn how to create a MySQL Database. MySQL Databases allow you to store lots of...
Importing databases and tables with phpMyAdmin Tanzania
This tutorial is to teach you how to import databases and tables with phpMyAdmin. We will assume...
Inserting fields into database tables with phpMyAdmin Tanzania
This tutorial is going to teach about the program phpMyAdmin, and how to Insert fields into...
Deleting tables in a database with phpMyAdmin Tanzania
This tutorial is to teach you about specific operations in phpMyAdmin. We are going to learn how...
Powered by WHMCompleteSolution