Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mk mk is offline
external usenet poster
 
Posts: 2
Default connect to MS SQL

Hi
I need to connect from excel macro to MS SQL Server. I registered
ado.ocx but when I try to use it I have massage about linces restriction.
So how I can connect to MS SQL server to take some information and use
it in my macro.
I'm writing it for barcode terminal.
http://www.nordicid.com/fileadmin/su.../software1.htm

thanks
mk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default connect to MS SQL

The ado.ocx is an ActiveX control that needs to be licensed to be used in a
project and you , apparently, do not have that license. You should still be
able to use ADO in VBA if you add a reference to "Microsoft ActiveX Data
Objects Library" (this should be the file "msadonn.dll" where nn is the
version number). But even easier is to let MSQuery do the work for you: from
the Data menu choose "Import External Data..." and "New Database Query..."
Then you need to specify your data source (SQL Server) and design a query in
MSQuery to get the data you want (MSQuery acts a little like MS Access).
Once you have your data set you "Return Data to Microsoft Excel" (File menu
in MSQuery) and that will dump it onto a worksheet - from there you can use
formulas and lookups to manipulate the data. For info refer to Help file and
lookup "Importing Data."

"mk" wrote:

Hi
I need to connect from excel macro to MS SQL Server. I registered
ado.ocx but when I try to use it I have massage about linces restriction.
So how I can connect to MS SQL server to take some information and use
it in my macro.
I'm writing it for barcode terminal.
http://www.nordicid.com/fileadmin/su.../software1.htm

thanks
mk

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect.UpdateToolbars? Alexdfw Excel Discussion (Misc queries) 0 May 18th 10 04:18 PM
Connect to OPC / DDE server Critcho Excel Worksheet Functions 0 December 6th 07 02:18 AM
Excel cannot connect to web Ltat42a Excel Discussion (Misc queries) 0 May 29th 06 05:18 PM
SQL Connect Soniya[_3_] Excel Programming 2 January 31st 05 07:39 AM
VB how to connect two sub's Christof[_5_] Excel Programming 2 November 11th 03 07:13 AM


All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"