|
-
Aug 2nd, 2002, 05:14 AM
#1
Thread Starter
Lively Member
Connecting to SQL Server from ADO.Net
Can anyone show me an example of how to connect to SQL server and retrieve a recordset for my asp.net page?
Cheers.
-
Aug 2nd, 2002, 07:49 AM
#2
Member
Dim strConn as string
Dim strSql as string
strConn = "connection string"
strSql = "Sql statement"
Dim Conn as new sqlClient.SqlConnection(strConn)
Dim adptExample as new sqlClient.dataAdapter(strSql,strConn)
Dim ds as new dataset
adptExample.fill(ds)
this will give you your dataset which you then can bind to a control or if you want to can access through code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|