If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How can I connect to Sybase DB with transaction In ASP?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-15-02, 23:28
wybin wybin is offline
Registered User
 
Join Date: Oct 2002
Posts: 2
Red face How can I connect to Sybase DB with transaction In ASP?

I need to connect to Sybase DB in ASP,transaction is also needed.
This is my ASP file:

Test.ASP

<%@ LANGUAGE=VBSCript TRANSACTION=Required%>
<Script Language=VBScript RUNAT=Server>

Dim gADODBConnString

gADODBConnString = "Provider=Sybase.ASEOLEDBProvider;User ID=sa;Password=;Data Source=unierp"

On Error Resume Next
Err.Clear

Set pObjConn = Server.CreateObject("ADODB.Connection")

pObjConn.ConnectionString = gADODBConnString
pObjConn.ConnectionTimeout = 180
pObjConn.Open

If Err.Number <> 0 Then
response.write "OpenDB Error" & Err.Number
response.end
End If



If the first line is deleted , the connection is OK,but if the first line is exist,the error will occur.

Can you help me how to deal it?
Thanks lot!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On