ADO connection

Results 1 to 2 of 2

Thread: ADO connection

  1. #1
    Join Date
    Dec 1969

    Default ADO connection

    I have the following code: -<BR><BR> Set Cnxn = Server.CreateObject("ADODB.Connection")<BR> strCnxn = mydsn<BR> Cnxn.Open strCnxn<BR> <BR> mysql = "select urn from tempdd where urn = &#039;" & myurn & "&#039;"<BR> Set rstIps = Server.CreateObject("ADODB.Recordset")<BR> Set rstIps = Cnxn.Execute(mysql) <BR><BR>But I would like it to return a record count. I know I must use the cursor types adOpenStatic and adLockOptimistic but don&#039;t quite know where to put them<BR><BR>When I don&#039;t use execute and use open on the recordset I use : -<BR><BR>oRS.Open mysql, mydsn, 3, 3 <BR><BR>But don&#039;t sure quite how it works with execute<BR><BR>Can you help please

  2. #2
    Join Date
    Dec 1969

    Default Check out the ADO...

    ...documentation on the Microsoft website:<BR><BR><BR><BR>In particular the Execute method for the connection object:<BR><BR><BR><BR>As far as I can see you can&#039;t tell the Execute method what cursor to use.<BR><BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts