Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create CA programmatically
Message
De
29/11/2004 08:28:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
How to create CA programmatically
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00965389
Message ID:
00965389
Vues:
48
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
Fil
Voir

Click here to load this message in the networking platform