Information générale
Catégorie:
Applications Internet
Titre:
Getting at foxpro with ADO.
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement