You need to include adovbs.inc at the top of  your file. Adovbs.inc
defines all the ADO constants, including adOpenStatic.
 
You can get it here (amongst lots of other places) :-
 
http://www.4guysfromrolla.com/webtech/faq/Beginner/faq7.shtml
 
Dan

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of kejeckam
Sent: 15 June 2005 14:11
To: [email protected]
Subject: [AspClassicAnyQuestionIsOk] Urgent. Access database connection
error


please I have the ASP code below as a page on ma site. but I 
normally get an error saying "Variable adOpenStatic undefined".
I have also used dim to define it but even got a worse error 
saying "Arguments not compatible". the line it points to for both 
errors is the line
rs.Open "SELECT * FROM dclinter", Connection, adOpenStatic, 
adLockPessimistic

Is it the ASP doesn't understand adOpenStatic and all that. pleasae 
help






<%@ Language=VBScript %>
<% Option Explicit %>
<% Response.Buffer = True %>


<html>

<head>
<title> test Response </title>
</head>

<body>
<%
Dim txtcode, txtresponse
dim trans
dim myDSN
dim mySQL
dim conn
dim rsconn
dim Tdata


      txtcode=request.querystring("RSPCODE")
      txtresponse=request.querystring("RSPDESC")
      trans=request.querystring("txnref")
      
      Tdata=server.mappath("/inter.mdb") 
      
      Dim ConnectionString
    ConnectionString = "DRIVER={Microsoft Access Driver 
(*.mdb)};Dbq=" & server.mappath("/inter.mdb") & ";UID=;PWD=;"
    
    Dim Connection
    Set Connection = Server.CreateObject("ADODB.Connection")
    
    
    Connection.ConnectionTimeout = 30
      Connection.CommandTimeout = 80
      Connection.Open ConnectionString
      
      
      Dim rs
      set rs = Server.CreateObject("ADODB.RecordSet")

      ' Retrieve the records
      rs.Open "SELECT * FROM dclinter", Connection, adOpenStatic, 
adLockPessimistic
      
      
      rs.addnew
      rs("rspcode")=txtcode
      rs("rspdesc")=txtresponse
      rs("txnref")=trans
      rs.update
      
      rs.close
      set rs=nothing
      
      Connection.close
      set Connection=nothing
      

%>

<script language="javascript">
<!--
window.close();

//-->

</script>
</body>

</html>





________________________________

Yahoo! Groups Links


*       To visit your group on the web, go to:
        http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
          
*       To unsubscribe from this group, send an email to:
        [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
subscribe> 
          
*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to