Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making PHDBase work under ExecScript()
Message
De
09/07/2007 14:52:14
 
 
À
09/07/2007 12:04:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01238479
Message ID:
01238693
Vues:
15
>It may or may not work with execscript. Use stringbuilder to create the script content as a single script and call it as if it was a stored procedure. ie:
>
>
>StringBuilder sb = new StringBuilder();
>sb.AppendLine("SET SAFETY OFF");
>sb.AppendLine("SET EXCLUSIVE OFF");
>sb.AppendLine("CLOSE ALL");
>sb.AppendLine("USE "+lcLocalDbf+"Thread in 0");
>sb.AppendLine("SET SAFETY OFF");
>//...
>string strScript = sb.ToString();
>
>cmd.CommandType = CommandType.StoredProcedure;
>cmd.CommandText = "ExecScript";
>cmd.Parameters.Add("myScript",OleDbType.Char).Value = strScript;
>cmd.ExecuteNonQuery();
>
Thanks, this approach is better. I am trying to execute the Parameters.Add() line however. This does not seem to be the proper syntax. I get a "Too many arguments to 'Public Function Add(value As Object) As Integer' error message at design time.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform