Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting at foxpro with ADO.
Message
De
09/11/1998 11:56:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Getting at foxpro with ADO.
Divers
Thread ID:
00155769
Message ID:
00155769
Vues:
52
Hey...

I've been working on an add form for a visual foxpro database I have. I want to use the addNew method from ADO. I'm having a lot of problems setting up the Recordset to point at a table, in order to do additions. I have no problem creaing a recordset to a SQL Query, and can read all of my data that way, but when I try to pass a table name to RS.open, I get command verb errors. Also, it complains about any value that I try to pass into the RS.lockType attribute.

Here is my initialization code that is leading to my progressive insanity:

Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.ConnectionTimeout = Session("ConnectionTimeout")
OBJdbConnection.CommandTimeout = Session("CommandTimeout")
OBJdbConnection.Open "DSN=AAASP"

Set RsAbstractList = Server.CreateObject("ADODB.Recordset")
RsAbstractList.ActiveConnection = OBJdbConnection
RsAbstractList.CursorType = adOpenKeySet
RsAbstractList.LockType = adLockOptimisticBatch
RsAbstractList.Source = "Aasp"
RsAbstractList.Open

As it stands, I get an error from the CursorType saying that "The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another." If I comment that line out, I get an command verb error form the .open line.

Any advice would be fantastic, I'm at my wits' end.

Cheers,

Andy.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform