General information
Title:
How to create CA programmatically
Environment versions
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only