Hi
I try from excel to connect a SQL server
I try to use Server.Createobject("ADODB.Connection")
Can't i use this in excel or is it because i shall install some Tools/Ref
Best regards Alvin
Hi
I try from excel to connect a SQL server
I try to use Server.Createobject("ADODB.Connection")
Can't i use this in excel or is it because i shall install some Tools/Ref
Best regards Alvin
"Alvin Hansen" <AlvinHansen@discussions.microsoft.com> wrote in message
news:081B6CC5-C6B6-41AD-8F5D-F70258740EFC@microsoft.com...
> I try from excel to connect a SQL server
> I try to use Server.Createobject("ADODB.Connection")
>
> Can't i use this in excel or is it because i shall install some Tools/Ref
Hi Alvin,
It looks like you copied that from some ASP code. There is no Server
object in Excel VBA, so change it to just:
CreateObject("ADODB.Connection")
and it should work fine in Excel.
--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/
* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
Thanks
Alvin
"Rob Bovey" skrev:
> "Alvin Hansen" <AlvinHansen@discussions.microsoft.com> wrote in message
> news:081B6CC5-C6B6-41AD-8F5D-F70258740EFC@microsoft.com...
> > I try from excel to connect a SQL server
> > I try to use Server.Createobject("ADODB.Connection")
> >
> > Can't i use this in excel or is it because i shall install some Tools/Ref
>
> Hi Alvin,
>
> It looks like you copied that from some ASP code. There is no Server
> object in Excel VBA, so change it to just:
>
> CreateObject("ADODB.Connection")
>
> and it should work fine in Excel.
>
> --
> Rob Bovey, Excel MVP
> Application Professionals
> http://www.appspro.com/
>
> * Take your Excel development skills to the next level.
> * Professional Excel Development
> http://www.appspro.com/Books/Books.htm
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks