Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Tables/Procedures via SPT on Oracle
Message
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00538544
Message ID:
00538608
Views:
11
Using the MS ODBC driver, I can not get multiple anything to be created with 1 SQLExec() function call. It all gets lumped into 1 object. I even tried it by submitting a SQL script file [using FileToStr] that I know works in SQL*Plus. That also fails. I have not tested with the Oracle drivers.

>Hi All,
>Let me preface this by saying I have a work around. I don't like it because I think it should be able to be done another way but t works.
>
>I created a CRUD SP builder that once you have your data model goes through and builds the generic data maintenance SPs for you. I initially built everything into one huge string (i.e. something like the result you would get using FileToString on a script file). I tried sending that to Oracle via SPT and it would come back with mixed results.
>
>The SQLExec would return okay but the resulting SP would be invalid. The problem being that Oracle would create the SP named in the first "Create or Replace Porcedure" statement and append everything else after it. The result of that is I would get 1 SP instead of 18. I put "/" between each create statement to make Oracle think it is one block.
>
>What I ended up doing is preprocessing the SQL code to see if multiple statements exist. If they do, I use ALines() to break them up into singular SQL statements and send those individually.
>
>Has anyone ever gotten mulitple blocks to run via SPT?
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform