N
newtodotnet
All
I am trying to get a very simple datastore to return data from SQL
Server on my machine (see code below). However I keep getting
ServerVersion <error: an exception of type:
{System.InvalidOperationException} occurred> error.
I have been using data reader object through out the ASP application
without any problems.
This seems to be datastore and data adapter error only. Any idea as to
what could be the cause of this problem?
I have tried different connect string including draging it from the
connection string with in the Visual Studio, nothing seems to be
working
Here is the code
Dim connString As String
Dim strSQL As String
Dim oTable As DataTable = New DataTable
connString = "Server=10.10.0.10;User
ID=user;Password=user123;"
strSQL = "SELECT ID,FullName,Address1 from PortalUser"
Dim oAdapter = New SqlClient.SqlDataAdapter(strSQL,
connString)
oAdapter.Fill(oTable)
I am using SQL Server Version: Microsoft SQL Server 2000 - 8.00.534
(Intel X86) Nov 19 2001 13:23:50 Copyright (c) 1988-2000 Microsoft
Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service
Pack 4)
VS Version 7.1.3088
Framework version 1.1.4322
Any help is much appreciated
TIA
I am trying to get a very simple datastore to return data from SQL
Server on my machine (see code below). However I keep getting
ServerVersion <error: an exception of type:
{System.InvalidOperationException} occurred> error.
I have been using data reader object through out the ASP application
without any problems.
This seems to be datastore and data adapter error only. Any idea as to
what could be the cause of this problem?
I have tried different connect string including draging it from the
connection string with in the Visual Studio, nothing seems to be
working
Here is the code
Dim connString As String
Dim strSQL As String
Dim oTable As DataTable = New DataTable
connString = "Server=10.10.0.10;User
ID=user;Password=user123;"
strSQL = "SELECT ID,FullName,Address1 from PortalUser"
Dim oAdapter = New SqlClient.SqlDataAdapter(strSQL,
connString)
oAdapter.Fill(oTable)
I am using SQL Server Version: Microsoft SQL Server 2000 - 8.00.534
(Intel X86) Nov 19 2001 13:23:50 Copyright (c) 1988-2000 Microsoft
Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service
Pack 4)
VS Version 7.1.3088
Framework version 1.1.4322
Any help is much appreciated
TIA