Recordset Opening probs--urgent

Results 1 to 3 of 3

Thread: Recordset Opening probs--urgent

  1. #1
    Panayotis Guest

    Default Recordset Opening probs--urgent

    When opening a new ADO rst someone has to declare the following lines according to the type of access to the rst he is reffering:<BR>Dim rst<BR> set rst = server.CreateObject ("ADODB.Recordset")<BR><BR> rst.Open strSQL1, objConn, adOpenStatic, adlockOptimistic, adCmdTable&#060;--So here somewhere in this line I got a fatal mistake that won&#039t open the recordset-- i use adOpenStatic to open the rst, adLockOptimistic to allow changes and the third option parameter adCmdTable is used for what?? and how can I choose what I want for my db?&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Recordset Opening probs--urgent

    replace adcmdtable with either adcmdtext, because your sql query is nothing but text, and adcmdtable is used if the string being executed contains the name of the table.If you don&#039t specify anything, the default will be adcmdunknown

  3. #3
    Join Date
    Dec 1969

    Default RE: Recordset Opening probs--urgent

    This text is from Beginning ASP Database by John Kauffman p.283<BR><BR>""The "options" parameter specifies how the database should interpret the "Source" parameter only if the "Source" parameter does not contain a Command object.<BR>You can improve the performance of your code by specifying this option. The default parameter if one has not been specified is adCmdUnknown. This means that ADO must go throught the process of trying to figure out wich type of "Source" paramter you have specified and this adds extra overhead to your processing""<BR><BR><BR>The possible values are:<BR>adCmdUnknown 8<BR>adCmdText 1<BR>adCmdTable 2<BR>adCmdStoredProc 4<BR>adCmdFile 256<BR>adCmdTableDirect 512<BR><BR>Hope this helps!

Posting Permissions

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