Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create CA programmatically
Message
From
29/11/2004 08:28:21
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
How to create CA programmatically
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00965389
Message ID:
00965389
Views:
49
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
Map
View

Click here to load this message in the networking platform