S
Steven K
OK, I'm stumped.
I am getting the error: Exception Details:
System.Data.OleDb.OleDbException: Syntax error or access violation
on the last line (spBusinessUnit = cmdBusinessUnit.ExecuteReader()) when
trying to connect to a SQL Server 2K machine (this works with ASP):
<%@ Page Language="VB" Explicit="True" Debug="True"%>
<%@ import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OLEDB" %>
Dim strConn As String
Dim cnnSearch As OleDbConnection
strConn = "Provider=SQLOLEDB;Data Source=MyServer;Initial
Catalog=MyDatabase;User ID=MyUser;Password=MyPswd;"
cnnSearch = New OleDbConnection(strConn)
cnnSearch.Open()
Dim spBusinessUnit As OleDb.OleDbDataReader
Dim cmdBusinessUnit As New OleDb.OleDbCommand("sp_web_Search
'FindBusinessProduct','','',''", cnnSearch)
cmdBusinessUnit.CommandType = CommandType.StoredProcedure
spBusinessUnit = cmdBusinessUnit.ExecuteReader()
I am getting the error: Exception Details:
System.Data.OleDb.OleDbException: Syntax error or access violation
on the last line (spBusinessUnit = cmdBusinessUnit.ExecuteReader()) when
trying to connect to a SQL Server 2K machine (this works with ASP):
<%@ Page Language="VB" Explicit="True" Debug="True"%>
<%@ import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OLEDB" %>
Dim strConn As String
Dim cnnSearch As OleDbConnection
strConn = "Provider=SQLOLEDB;Data Source=MyServer;Initial
Catalog=MyDatabase;User ID=MyUser;Password=MyPswd;"
cnnSearch = New OleDbConnection(strConn)
cnnSearch.Open()
Dim spBusinessUnit As OleDb.OleDbDataReader
Dim cmdBusinessUnit As New OleDb.OleDbCommand("sp_web_Search
'FindBusinessProduct','','',''", cnnSearch)
cmdBusinessUnit.CommandType = CommandType.StoredProcedure
spBusinessUnit = cmdBusinessUnit.ExecuteReader()