>Hi Cetin,
>
>I have managed to get the code to work for a select statement. I had to change the sqlconnection define.
>
>I have a few more questions.
>1) Do I need to execute the create object for each sql statement i need to call?
>2) Do I not need to close the connection at the end?
>3) I have include an example to add a record but I get the error "alias not found". Is this the right way I'm doing it
>
>oXC1 = Createobject('xcADOUpdatable', "vtbltest", SQLCONNECTION, ;
> "insert into tbltest values(4,4,'my area','my officer')",;
> "tbltest",;
> "",;
> "id,region,area,officer",;
> "id tbltest.id, region tbltest.region, area tbltest.area, officer tbltest.officer")
>
>=Tableupdate(.t.)
>
>Do I need to do anything different for an insert,update or delete?
Stuart,
I think you got the sample wrong. It'd only have a select command, not insert. You can then insert,update, delete in the cursor you got as with any other table\cursor.
But if you have special insert,delete designations then define them in CA class' InsertCmd, UpdateCmd, DeleteCmd properties.
Cetin