Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp conectivity with acess data base

Status
Not open for further replies.

gilc

MIS
Feb 20, 2002
36
HK
Hi,
Iam making an E-COMMERCE web-site and this is an ASP code that i have been using to connect the ACCESS DATA BASE but the problem i have been facing is that this code is not connecting with the DATA BASE could any one please help me out that what is the problem in it.
reply as soon as possible
thanks gilca

<!-- METADATA TYPE=&quot;typelib&quot;
FILE=&quot;C:\Program Files\Common Files\SYSTEM\ADO\msado15.dll&quot; -->
<%



Dim objconn
Set objconn = Server.CreateObject (&quot;ADODB.Connection&quot;)
Dim objConn
Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objconn.open &quot;DSN=abs&quot;


If Session(&quot;blnValidUser&quot;) = True and Session(&quot;PersonID&quot;) = &quot;&quot; Then
Dim rsPersonIDCheck
Set rsPersonIDCheck = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Dim strSQL
strSQL = &quot;SELECT PersonID FROM Person &quot; & _
&quot;WHERE EMailAddress = '&quot; & Session(&quot;EMailAddress&quot;) & &quot;';&quot;
rsPersonIDCheck.Open strSQL, objConn
If rsPersonIDCheck.EOF Then
Session(&quot;blnValidUser&quot;) = False
Else
Session(&quot;PersonID&quot;) = rsPersonIDCheck(&quot;PersonID&quot;)
End If
rsPersonIDCheck.Close
Set rsPersonIDCheck = Nothing
End If
%>





 
You have established connection twice..

Dim objconn
Set objconn = Server.CreateObject (&quot;ADODB.Connection&quot;)
Dim objConn
Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objconn.open &quot;DSN=abs&quot;


Can see that .. Rushi Shroff Rushi@emqube.com
&quot;Life is beautiful.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top