Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bulk Import Sql Scripts
Message
From
28/04/2003 19:55:27
 
 
To
25/04/2003 17:09:31
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
00781258
Message ID:
00782538
Views:
16
I got around the below problem by creating a .bat file and using the /N switch. Then I ran into the problem that I need to wait until the batch file was completed before moving to the next line of code. I used Ed Rauh's API_APPRUN class and it is working but maybe there is an easier way.

>I'm running the OSQL utility from within foxpro but I'm getting a "Program too big to fit in memory" error. Have you had this problem?
>

>No, my script below uses Windows Authentication, that's the -E parameter. I believe it's optional, if you don't pass in username and password, osql should try using Windows Authentication.
>
>To pass in username and password, use -U and -P parameters.
>
>Roman
>
>
>>Do you need to pass in user id and password into osql?
>>
>>>You can use the osql utility, you can read about it in BOL. It allows you to execute SQL commands, including contents of a file. Here is an example, I use this to back a database on development server, copy the backup file to my computer and then restore the database on my local server:
>>>
>>>osql -S devweb2 -d master -E -i "C:\Projects\COM\Backup\BackupPerson01.sql"
>>>copy J:\comPerson.BAK c:\projects\com\backup
>>>osql -S ltrehak -d master -E -i "C:\Projects\COM\Backup\RestorePersonDB.sql"
>>>
>>>If you do it this way, you don't need an executable as long as SQL Server Client Tools are installed and it's easy to make modifications because all you need to do is to edit the batch file or SQL files.
>>>
>>>Roman
>>>
>>>
>>>>I've got a program that generates one script file and mutliple text files that will be bulk imported from the query analyzer. I need to wrap all of this into an exe that a user can run with a simple double click of an icon. I'm not sure how to proceed.
>>>>
>>>>Any help or suggestions you can give me would be greatly appreciated.
>>>>
>>>>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform