Results 1 to 2 of 2

Thread: Dataset error

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2002
    Posts
    38

    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" %>

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2002
    Posts
    38
    Never mind, it's OK now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width