If you mean to a MS SQL Server table then yes you can do his in a number of
ways.
For exmple you can use
A pass-through query
ADO
With a pass-through query you would
a) create a new query
b) cancel the dialog that appears
c) Choose the Query/SQL Specific/Pass-Through menu otion
d) Open the Query Properties dialog
e) Enter a valid ODBC connection string
f) Enter your ALTER TABLE sql
g) Execute the query
WIth ADO you would do something like
Dim oC as ADODB.Connectio n
Dim strSQl as string
strSQL = "ALTER TABLE ..."
Set oC = new ADODB.Connectio n
With oC
.ConnectionStri ng = "Provider=SQOLE DB.1;..."
.Open
.Execute strSQl
.Close
End With
set oC = nothing
--
Terry Kreft
"Paradigm" <alecjames1@hot mail.com> wrote in message
news:Crung.4592 7$qD.26551@news fe1-gui.ntli.net...[color=blue]
> Is it possible to run an sql script to add another column to an sql table
> from MS Access.
> If so how would I do it.
> Thanks
> Alec
>
>[/color]
Paradigm wrote:[color=blue]
> Is it possible to run an sql script to add another column to an sql table
> from MS Access.
> If so how would I do it.
> Thanks
> Alec[/color]
"Terry Kreft" <terry.kreft@mp s.co.uk> wrote in message
news:Yc6dnVu-jqcxDgPZSa8jmw@ karoo.co.uk...[color=blue]
> If you mean to a MS SQL Server table then yes you can do his in a number[/color]
of[color=blue]
> ways.
>
> For exmple you can use
> A pass-through query
> ADO
>
>
>
> With a pass-through query you would
> a) create a new query
> b) cancel the dialog that appears
> c) Choose the Query/SQL Specific/Pass-Through menu otion
> d) Open the Query Properties dialog
> e) Enter a valid ODBC connection string
> f) Enter your ALTER TABLE sql
> g) Execute the query
>
> WIth ADO you would do something like
>
> Dim oC as ADODB.Connectio n
> Dim strSQl as string
>
> strSQL = "ALTER TABLE ..."
>
> Set oC = new ADODB.Connectio n
> With oC
> .ConnectionStri ng = "Provider=SQOLE DB.1;..."
> .Open
> .Execute strSQl
> .Close
> End With
> set oC = nothing
>
>
> --
>
> Terry Kreft
>
>
> "Paradigm" <alecjames1@hot mail.com> wrote in message
> news:Crung.4592 7$qD.26551@news fe1-gui.ntli.net...[color=green]
> > Is it possible to run an sql script to add another column to an sql[/color][/color]
table[color=blue][color=green]
> > from MS Access.
> > If so how would I do it.
> > Thanks
> > Alec
> >
> >[/color]
>
>[/color]
Replace x.x in the above line with the version number.
--
Terry Kreft
"Paradigm" <alecjames1@hot mail.com> wrote in message
news:ixMng.4906 7$qD.24225@news fe1-gui.ntli.net...[color=blue]
> Thanks
> What references do I need for ADO
> Alec
>
> "Terry Kreft" <terry.kreft@mp s.co.uk> wrote in message
> news:Yc6dnVu-jqcxDgPZSa8jmw@ karoo.co.uk...[color=green]
> > If you mean to a MS SQL Server table then yes you can do his in a number[/color]
> of[color=green]
> > ways.
> >
> > For exmple you can use
> > A pass-through query
> > ADO
> >
> >
> >
> > With a pass-through query you would
> > a) create a new query
> > b) cancel the dialog that appears
> > c) Choose the Query/SQL Specific/Pass-Through menu otion
> > d) Open the Query Properties dialog
> > e) Enter a valid ODBC connection string
> > f) Enter your ALTER TABLE sql
> > g) Execute the query
> >
> > WIth ADO you would do something like
> >
> > Dim oC as ADODB.Connectio n
> > Dim strSQl as string
> >
> > strSQL = "ALTER TABLE ..."
> >
> > Set oC = new ADODB.Connectio n
> > With oC
> > .ConnectionStri ng = "Provider=SQOLE DB.1;..."
> > .Open
> > .Execute strSQl
> > .Close
> > End With
> > set oC = nothing
> >
> >
> > --
> >
> > Terry Kreft
> >
> >
> > "Paradigm" <alecjames1@hot mail.com> wrote in message
> > news:Crung.4592 7$qD.26551@news fe1-gui.ntli.net...[color=darkred]
> > > Is it possible to run an sql script to add another column to an sql[/color][/color]
> table[color=green][color=darkred]
> > > from MS Access.
> > > If so how would I do it.
> > > Thanks
> > > Alec
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]
Comment