Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: SV: Connection to Sybase database using ASP - Need help


Message #1 by =?iso-8859-1?Q?H=E5kan_Frennesson?= <hakan@c...> on Wed, 20 Feb 2002 22:39:18 +0100
Hi!



Look at this link:

http://www.able-consulting.com/ado_conn.htm



Hakan



-----Ursprungligt meddelande-----

Fr=E5n: klbond@n... [mailto:klbond@n...]

Skickat: den 20 februari 2002 19:30

Till: ASP Databases

=C4mne: [asp_databases] Connection to Sybase database using ASP - Need

help





Hello,



I've tried several code examples to connect to a sybase database using 

asp

and nothing's working.  I think I need to define Username and Password 

but

can't get that code to work either.

Can someone please tell me what's needed and how to properly code 

Username

and Password, please?



Thanks,  Kathy



Here's the first attempt showing the error message, followed by the two

asp files used:



Microsoft OLE DB Provider for ODBC Drivers error '80004005'



[INTERSOLV][ODBC SQL Server driver]Insufficient information to connect 

to

the data source.

/test/dbconn.asp, line 5





This is conntest.asp:



<% @language=3Dvbscript %>

<% Option Explicit %>



<!--#include file=3D"dbconn.asp"-->



<%

sql =3D "select proj_no, proj_amt from project where proj_no =3D 

'000123'"

Set rs =3D dbConn.Execute(sql)

if not rs.EOF then

   response.write proj_no

end if

%>



This is dbconn.asp:



<%

Dim objConn

Set objConn =3D Server.CreateObject("ADODB.Connection")

objConn.ConnectionString =3D "DSN=3DdbAcct"

objConn.Open

%>






$subst('Email.Unsub').




  Return to Index