-
Window 2000 & IIS 5.0 & SQL Server 7.0
Hi,
1. On Window 2000, can we use the IIS 5.0 to establish a connection to SQL
Server 7.0 ?
If the answer to #1 is "yes", then what steps do I have to do ? Any detailed
instructions
or sample codes would be helpful.
2. The following ASP code has been working on Window NT, IIS 1.0 & SQL Server
6.0 and
now it doesn't work on Window 2000 & IIS 5.0 & SQL Server 7.0
<%
Set DBConnection = Server.CreateObject( "ADODB.Connection" )
Session( "ConnectionString" ) = "dsn=given_dsn;uid=given_uid;pwd=given_pwd"
DBConnection.Open Session( "ConnectionString" )
Set ResultSet = DBConnection.Execute( given_sql_string ) ' this is
line 23
%>
The above 4th line currently gives me the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)
Command text was not set for the command object.
/aw/queryp.asp, line 23
Please help. Many thanks.
kv-
-
Re: Window 2000 & IIS 5.0 & SQL Server 7.0
The problem is just what it says it is. You need to set the CommandText property
when running the Execute method of a connection. I dont have my ADO book
open in front of me, but just look up the syntax of the Execute method of
the Connection object, and set your CommandType accordingly.
To answer question #1, yes, you can use ADO in IIS5 with no problems. Your
ADO syntax shouldnt be changing just becuase you're calling it from withing
IIS5. Dont forget ADO is its own set of objects, that are just being called
by the ASP interpreter of IIS. The way you open an object correctly through
MTS changes a bit with Win2K and COM+.....but it doenst look like you're
doing that anyway.
Andrew
"Kimoanh T. Vo" <kvo@dreamworks.com> wrote:
>
>Hi,
>
>1. On Window 2000, can we use the IIS 5.0 to establish a connection to SQL
>Server 7.0 ?
>If the answer to #1 is "yes", then what steps do I have to do ? Any detailed
>instructions
>or sample codes would be helpful.
>
>2. The following ASP code has been working on Window NT, IIS 1.0 & SQL Server
>6.0 and
>now it doesn't work on Window 2000 & IIS 5.0 & SQL Server 7.0
>
><%
>Set DBConnection = Server.CreateObject( "ADODB.Connection" )
>Session( "ConnectionString" ) = "dsn=given_dsn;uid=given_uid;pwd=given_pwd"
>DBConnection.Open Session( "ConnectionString" )
>Set ResultSet = DBConnection.Execute( given_sql_string ) ' this is
>line 23
>%>
>
>The above 4th line currently gives me the following error:
>
>Error Type:
>Microsoft OLE DB Provider for ODBC Drivers (0x80040E0C)
>Command text was not set for the command object.
>/aw/queryp.asp, line 23
>
>Please help. Many thanks.
>
>kv-
>
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|