Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making PHDBase work under ExecScript()
Message
From
09/07/2007 14:52:14
 
 
To
09/07/2007 12:04:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01238479
Message ID:
01238693
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform