Information générale
Titre:
How to create CA programmatically
Versions des environnements
Network:
Windows 2000 Server
dear all
Any body help me how to create CursorAdopter Programitically,
i made a sample code but it is not working properly
I placed command button and i wrote in click event of the button,
when cliking this button i got ann error that 'Alias not found.'
cSqlPath = "Provider=SQLOLEDB.1;";
+"Integrated Security=SSPI;";
+"Persist Security Info=False;";
+"Initial Catalog=SqlData;";
+"Data Source=admin;";
+"Initial File Name="+"'"+D:\SqlData\Sql_Data.MDF+"'"
cSqlDb.ConnectionString = cSqlPath
cSqlDb.open()
cCA = CREATEOBJECT('Cursoradapter')
WITH cCA
.Alias = "Cus"
.Allowdelete = .T.
.Allowinsert = .T.
.Allowupdate = .T.
.Batchupdatecount = 1
.Buffermodeoverride = 3
.Comparememo = .T.
.Cursorschema = [CUS_Code C(15), Cus_Name C(40)]
.Datasource= cSqlDb
.Datasourcetype = "ADO"
.Fetchmemo = .T.
.Fetchsize = 100
.Maxrecords = -1
.Name = "Cus"
.Sendupdates = .T.
.Tag = cSqlPath
.Tables = [customer]
.Selectcmd = [Select customer.CUS_Code,CUS_Name From Customer]
.cursorfill()
.Usememosize = 255
.Wheretype = 3
ENDWITH
SELECT cus
BROWSE
i need somebody's kind help....................
With Thanks and Regards
Abdulla
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