GML101
Programmer
- Jul 23, 2007
- 2
Hi
There has to be a simple answer to this one
I am upgrading a web site to asp net and SQLserver but want to keep the asp forms I have on the site which are essentially driven by hyperlinks from Grid View data
When i sign on to the site I have no problems running sql select statements on the asp net pages and getting the result i require
However when I hyperlink to the asp form,it is required to connect to the same database table and collect the data to complete the form
Herein lies the problem - using the following connection string and many variants of it
ASP Code
<%Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("customer_ConnectionString")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = Conn
strSQL = ("SELECT * FROM Test")
rs.open strSQL
%>
I get - [SQL Server]Invalid object name 'Test'.(DB table)
The actual connection string is "Driver={sql native client};Data source=GML" where the GML is a system DSN designed to replicate the following and it tests OK
if i use this connection string instead of the DSN
"Driver={SQL Native Client};Server=machinename\sqlexpress;Database=customer;integrated security=yes;"
And the path to the data base is given or not
I get -Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
As both strings seem identical - What is the problem?
Connection strings are held in global.asa
Having said this the DSN string does seem to get me to the database but not the table
There is nothing wrong with the select statements (checked in analyzer)
Suffice to say the site works fine in ASP/Access but I have this problem with ASPNET/SQLSERVER/ASP
Sorry the question is so long - but pls could some-one point me in the right direction to get the SQLserver connection from an ASP page that I get from an ASPNET page
If it is a permissions problem - why does it work aspnet-sql and not asp - sql
Thanks
There has to be a simple answer to this one
I am upgrading a web site to asp net and SQLserver but want to keep the asp forms I have on the site which are essentially driven by hyperlinks from Grid View data
When i sign on to the site I have no problems running sql select statements on the asp net pages and getting the result i require
However when I hyperlink to the asp form,it is required to connect to the same database table and collect the data to complete the form
Herein lies the problem - using the following connection string and many variants of it
ASP Code
<%Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("customer_ConnectionString")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = Conn
strSQL = ("SELECT * FROM Test")
rs.open strSQL
%>
I get - [SQL Server]Invalid object name 'Test'.(DB table)
The actual connection string is "Driver={sql native client};Data source=GML" where the GML is a system DSN designed to replicate the following and it tests OK
if i use this connection string instead of the DSN
"Driver={SQL Native Client};Server=machinename\sqlexpress;Database=customer;integrated security=yes;"
And the path to the data base is given or not
I get -Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
As both strings seem identical - What is the problem?
Connection strings are held in global.asa
Having said this the DSN string does seem to get me to the database but not the table
There is nothing wrong with the select statements (checked in analyzer)
Suffice to say the site works fine in ASP/Access but I have this problem with ASPNET/SQLSERVER/ASP
Sorry the question is so long - but pls could some-one point me in the right direction to get the SQLserver connection from an ASP page that I get from an ASPNET page
If it is a permissions problem - why does it work aspnet-sql and not asp - sql
Thanks