Re: Running T_SQL scripts form Access
- From: "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
- Date: Mon, 19 Jun 2021 20:30:12 -0400
Maybe you can try to edit a Query in design Mode, switch to the SQL view and
then use the Run command. You can also put your stuff in a Stored Procedure
and run it.
However, the best way to design your database would be to no use Access.
Enterprise Manager 2000 or its successor SSMS 2005 are much more powerful
client tools (altough some people seems to not be atonished by the speed of
SSMS). You can also find many other tools on the web.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"Merlin" <evalua@xxxxxxxxxxxxxxxx> wrote in message
news:B68C7754-785E-48FC-AA53-9B52137EF36B@xxxxxxxxxxxxxxxx
Thanks, that worked.
Is there a nicer way though?
Scripts can be quite big and I had to put it all on one line in the debug
window.
It also wouldn't accept 'GO', so if there is more than one step you would
have to do each one separately.
Is there no window you can just run scripts from?
Thanks
"Sylvain Lafontaine" wrote:
Try with CurrentProject.Connection.Execute
Probably that you can run it from the Immediate Window (also known as the
debug window) but I never tried.
In VBA code, it will be either with the above call or using ADO objects.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"Merlin" <evalua@xxxxxxxxxxxxxxxx> wrote in message
news:9FB38536-5ADB-4C97-8DA3-38F43E033293@xxxxxxxxxxxxxxxx
If I have a TSQL script to create a table (for example), is there some
way
I
can can I run it against a SQL Server database from Access?
I assumed I could just paste it into a Query window, but I can't get it
to
work that way.
.
- Follow-Ups:
- Re: Running T_SQL scripts form Access
- From: Sylvain Lafontaine
- Re: Running T_SQL scripts form Access
- References:
- Re: Running T_SQL scripts form Access
- From: Sylvain Lafontaine
- Re: Running T_SQL scripts form Access
- Prev by Date: Re: Running T_SQL scripts form Access
- Next by Date: Re: Running T_SQL scripts form Access
- Previous by thread: Re: Running T_SQL scripts form Access
- Next by thread: Re: Running T_SQL scripts form Access
- Index(es):
Relevant Pages
|