Server.CreateObject("ADODB.Command") and error

Results 1 to 3 of 3

Thread: Server.CreateObject("ADODB.Command") and error

  1. #1
    Svetlana Guest

    Default Server.CreateObject("ADODB.Command") and error

    I need to use stored procedures in asp page but I have a problem.<BR>This is my function<BR>function GetStoredProcedure(Conn,spName)<BR>{<BR> var Cmd = Server.CreateObject("ADODB.Command");<BR> Cmd.ActiveConnection = Conn;<BR> Cmd.CommandText = spName;<BR> Cmd.CommandType = adCmdStoredProc;<BR> return Cmd;<BR>}<BR>in run-time I&#039ve got an error that &#039adCmdStoredProc&#039 is not defined.<BR>How can I define it? I thought that it&#039s reserved constant for Command in ADO

  2. #2
    Join Date
    Dec 1969

    Default RE: Server.CreateObject(

    Include file or use the numeric value for that constant.<BR><BR>You&#039ll find the constants and the values in an ADO reference book or MSDN.

  3. #3
    Svetlana Guest

    Default Thank you very much!

    I used numbers :))

Posting Permissions

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