Running TSQL scripts in MSDE 
Author Message
 Running TSQL scripts in MSDE
Please help me.

I have a TSQL script generated by SQL Server 7 to generate database
objects - Tables, Stored Procs, etc. Is there any way I can run this from
the Access 2000 interface to generate the db objects in MSDE?

Any info will be much appreciated.

Thank you.

will f.



Sun, 12 Dec 2004 21:27:54 GMT
 Running TSQL scripts in MSDE

You can't execute an entire script in one gulp, but you can execute
commands from VBA:

cnn.Execute "CREATE TABLE blah blah blah"

you need a separate .Execute in the place of the GO to separate each
batch.

 -- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446

Quote:

>Please help me.

>I have a TSQL script generated by SQL Server 7 to generate database
>objects - Tables, Stored Procs, etc. Is there any way I can run this from
>the Access 2000 interface to generate the db objects in MSDE?

>Any info will be much appreciated.

>Thank you.

>will f.



Sun, 12 Dec 2004 23:33:39 GMT
 Running TSQL scripts in MSDE
You can use the query designer to execute a pass-through query.  You'll have
to cut-and-paste the SQL script into the query editor (no way to open a
file), but that should work.  You'll also have to set the connection
information for the query.  If you do not set this info, it will prompt you
for it when you try to run the query.

HTH


Quote:
> Please help me.

> I have a TSQL script generated by SQL Server 7 to generate database
> objects - Tables, Stored Procs, etc. Is there any way I can run this from
> the Access 2000 interface to generate the db objects in MSDE?

> Any info will be much appreciated.

> Thank you.

> will f.



Mon, 13 Dec 2004 01:14:20 GMT
 Running TSQL scripts in MSDE
The only problem with your suggestion is that there is no such thing
as a pass-through query in an adp ;-(

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446



Quote:
>You can use the query designer to execute a pass-through query.  You'll have
>to cut-and-paste the SQL script into the query editor (no way to open a
>file), but that should work.  You'll also have to set the connection
>information for the query.  If you do not set this info, it will prompt you
>for it when you try to run the query.

>HTH



>> Please help me.

>> I have a TSQL script generated by SQL Server 7 to generate database
>> objects - Tables, Stored Procs, etc. Is there any way I can run this from
>> the Access 2000 interface to generate the db objects in MSDE?

>> Any info will be much appreciated.

>> Thank you.

>> will f.



Mon, 13 Dec 2004 06:08:53 GMT
 Running TSQL scripts in MSDE
Let me try as well.

Wrap the script into a stored procedure, and run it from Access.

Vadim

Quote:

> Please help me.

> I have a TSQL script generated by SQL Server 7 to generate database
> objects - Tables, Stored Procs, etc. Is there any way I can run this from
> the Access 2000 interface to generate the db objects in MSDE?

> Any info will be much appreciated.

> Thank you.

> will f.



Mon, 13 Dec 2004 12:30:51 GMT
 Running TSQL scripts in MSDE

Hi Will,

In addition to what everyone else said, there is an example of now to do this in NorthwindCS.adp.   When
opening NorthwindCS.adp for the first time, Access runs some code in the "Startup" module to create the
database on SQL Server and then call a function called "RunScript" that loops through the contents of
NorthwindCS.sql and sends them to SQL Server one batch at a time.

Also, if MSDE is installed locally, you can connect using the osql.exe utility and run the whole script file form
there.

I hope this helps! If you have additional questions on this topic, please reply to this posting.

Brian M. Sockey
Microsoft Access Developer Support

---------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.
? 2001 Microsoft Corporation. All rights reserved.

--------------------

| Subject: Running TSQL scripts in MSDE
| Date: Wed, 26 Jun 2002 09:27:54 -0400
-Tomcat-NG: microsoft.public.access.adp.sqlserver
|
| Please help me.
|
| I have a TSQL script generated by SQL Server 7 to generate database
| objects - Tables, Stored Procs, etc. Is there any way I can run this from
| the Access 2000 interface to generate the db objects in MSDE?
|
| Any info will be much appreciated.
|
| Thank you.
|
| will f.
|
|
|



Wed, 15 Dec 2004 04:36:11 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. execute many sql-scripts in one script

2. Error: ActiveX Scripting was not able to initialize the script execution engine

3. ActiveX Script Task: unable to initialize the script execution engine :-(

4. Passing data between Filemaker Scripts and Windows VBS scripts

5. executing external scripts from external scripts

6. ActiveX Script Text box missing from ActiveX Script Task Properties

7. ActiveX scripting was not able to initialize the script execution engine

8. Calling sql script from a sql script

9. any body has a script to script users permissions on db objects

10. execute a sql script from a script?

11. ERROR: ActiveX Scripting was not able to initialize the script execution engine

12. AZ-Phoenix-267741--UNIX-Scripting-Relational Database-Data Warehousing-ORACLE-Unix Scripts Writer


 
Powered by phpBB® Forum Software