Results 1 to 2 of 2

Thread: DataReader

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2003
    Posts
    47

    DataReader

    I have a question regarding the ADO.NET DataReader.

    Basically, I'm instantiating a command object (with SQL statement and open connection)...then doing the following:


    dim reader as new oledb.oledbdatareader()
    reader = command.executeReader()

    For some reason, I'm getting an "unspecified error" from VB.

    Any ideas??

    Thanks!!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The datareader shouldn't have a public constructor so this line should be incorrect:
    dim reader as new oledb.oledbdatareader()

    Try this:
    dim reader as oledb.oledbdatareader = command.executeReader()

    Also I am assuming that the command object is of the oledb type as well.

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