Trying to connect to server database instead of access database was using this code

DevintheDude

Board Regular
Joined
Jun 8, 2007
Messages
153
NOTE: FOR SOME REASON WHEN I TRY
DIM CONN AS NEW ADODB.CONNECTION
ADODB IS NOT AVAILBLE TO ME AS AN OBJECT WHY IS THAT?


dbdir = getdir(ActiveWorkbook)
partsdb = dbdir & "Product_PriceDB"
set dbspartslist = OpenDatabase(partsdb, , true)
set rstTemp = dbspartslist.OpenRecordset("CommonAssemblyname",dbOpenTable)
with rstTemp

//do something

end with


HOW DO I CONVERT THIS TO ACCESS THE SAME DATABASE JUST ON SQL SERVER?
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
You need to set a reference to the Microsoft ActiveX Data Objects 2.n library (the n will be a number depending on which version is installed on your machine)
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,090
Members
449,065
Latest member
Danger_SF

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