AdUseClient probelm

Results 1 to 2 of 2

Thread: AdUseClient probelm

  1. #1
    Join Date
    Dec 1969

    Default AdUseClient probelm

    &nbsp;<BR>Hi,<BR> <BR>I&#039;m trying to inplement an OWC (office Web Components) graph on an asp page using the article on the 4 guysfromrolla site by Bret Hern called Charting with office Web Components.<BR><BR>To use OWC with a data base it says you need to use a client side, non-foward-only cursor. <BR><BR>I am using the following code to set up my connection to an SQL server 7 database<BR><BR>strConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=SPAMWeb;PWD=password;Initial Catalog=Spam;Data Source=localhost"<BR><BR>set objconn = server.CreateObject("ADODB.connection")<BR><BR>obj conn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=SPAMWeb;PWD=password;Initial Catalog=Spam;Data Source=localhost"<BR><BR>set rst = server.CreateObject("ADODB.Recordset")<BR>set rst.ActiveConnection = objconn<BR>rst.CursorType=adOpenStatic<BR>rst.Curs orLocation =adUseClient<BR><BR>When i run the code I get this error<BR><BR>Microsoft VBScript runtime error &#039;800a01f4&#039; <BR><BR>Variable is undefined: &#039;adOpenStatic&#039; <BR><BR>/Spam/newspam/graph.asp, line 21 <BR> <BR>I think it thinks that adOpenStatic is a variable instead of a setting. I have read that some database don&#039;t support the adOpenStatic property could this be the problem<BR><BR>If anyone knows how to connect to an SQL server database using the client side, non-foward-only cursor mode please let me know<BR><BR>all help very much appreciated<BR><BR>cheers Paul<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: AdUseClient probelm

    The problem is that your are using ADO constants without defining them first. There are 3 ways to define these constants:<BR><BR>1. Define them in script as needed. Probably the best option if you only use a couple.<BR>2. #include - this include file contains definitions for ALL the ADO constants.<BR>3. Add a METADATA reference to the ADO type library in global.asa (in VID, Project &#124 Add Reference...)<BR><BR>Dunc

Posting Permissions

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