|
-
Apr 16th, 2002, 12:25 AM
#1
Thread Starter
Member
Dataset error
Hi
Can anyone tell me what's wrong with this code?
Dim Conn As SqlConnection
Dim ConnString As String
Dim SQLstr As String
Dim SQLCmd As SQLCommand
ConnString="server=server;UID=userid;PWD=password"
SQLstr="SELECT Name FROM Biz WHERE Name Like '%abc%'"
Conn = New SqlConnection(ConnString)
SQLCmd = New SQLCommand(SQLstr, Conn)
Dim DAdapter as SqlDataAdapter = New SqlDataAdapter()
DAdapter.SelectCommand = SQLCmd
Dim DSet as DataSet = New DataSet()
DAdapter.Fill(DSet, "biz") <--- crash here
And yes, I've added the following lines to my code:
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
-
Apr 16th, 2002, 03:50 AM
#2
Thread Starter
Member
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
|