473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

suggestions in connecting to an access database?

55
Hi everyone,

i'm using an access database and the way i access it is thru an odbc systemdsn. but this time i don't want to use an odbc since when i install the program to other computers i have to keep on setting up the odbc how do i overcome this? any suggestions on what should i use instead?
Nov 27 '07 #1
3 1085
Muiz
6
Hi,

May be you can try using ADODB recordset.
Expand|Select|Wrap|Line Numbers
  1. Dim con As ADODB.Connection
  2. Dim rs As ADODB.Recordset
  3.  
  4. Set rs = New ADODB.Recordset
  5. Set con = New ADODB.Connection
  6. con.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=\\wangmod2\Database\Col AMS.mdb;" & "Jet OLEDB:Database Password=compaq"
  7. con.Open
  8. rs.Open "SELECT Username From Login;", con, adOpenDynamic, adLockOptimistic
  9.  
  10. ...
  11. ....
  12. rs.close
  13. con.close
  14.  
try this and let me know if you face problems.
Nov 27 '07 #2
CyberSoftHari
487 Expert 256MB
This type of code, you have to create exe for each time when the database path changed.
Write connection string in text file and read it from there. This will be easy.
Nov 27 '07 #3
jaz215
55
Thanks a lot you two :D

it really helped me... ;P
Nov 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
1
by: Salad | last post by:
If one distributes a front/backend app is there a good practice for refreshing the links? I was thinking that the first time the user enters the app, it could check for any tables. If the...
1
by: hk777 | last post by:
Hi I have Access 2007 installed at work, and last week it suddenly started asking me for a username and password whenever I try to open anything, even a new database. If I log in to my computer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.