SQL..... from EXCEL???

miffe

New Member
Joined
May 3, 2006
Messages
15
Is it possible to INSERT from Excel on one PC to Access (.MDB) on another PC?

How could I do this? Do I have to perform some kind of connect/disconnect like on php-mysql but from VBA? Or how can I update information on the DB remotely...

Let's say I have an excel worksheet that gathers info from the DB, and then I have to output some info back to it... like client info, etc... I know how to gather the info initially, I just connect and update fields in excel... then I made a macro to do it automatically... But how can I update the DB remotely.. from Excel?


Thanks -
Miffe
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I'll restate my question in a simpler form:

Is there a way to INSERT values in a .MDB using SQL from EXCEL including cells from a workbook?

Via which method? VBA? Query editor?

Thanks a lot, a quick example would be appreciated,
- Miffe
 
Upvote 0
Hi Miffe,

Yes you can do it using ADO. Here is the first working example I put together... http://www.mrexcel.com/board2/viewtopic.php?t=114080

You need to set a reference in the Excel VBE to the Microsoft ActiveX Data Objects 2.x library (or Microsoft ADO 2.x) for this to work.

Performance over a network is quick -- several hundred records a second is typical.

Denis
 
Upvote 0
thanks

thanks a lot, seems just perfect, didn't know that about the reference to the active x control - this will just do!

have a great day... or night (who knows what time it is in australia :S)
- miffe
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top