473,320 Members | 1,853 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,320 software developers and data experts.

Script to connect to a server via ODBC

Having uploaded my mdb (Access 2000) tables to a server I would like to make a connection (ODBC) using script rather than pass through queries to update and retrieve data, is this possible?

If it is possible how and where would I place the code.

I currently make a connection using MySQL ODBC 3.51 Driver- DSN Configuration (Access inbuilt facility) but each time I open the database I am asked to enter the "UserName" into the MySQL Connection Parameters. OK while I am the only user but in time I aim to have multi users. Hence I would rather build the connection script into each relevant form \ query.
Apr 10 '07 #1
9 4290
ADezii
8,834 Expert 8TB
Having uploaded my mdb (Access 2000) tables to a server I would like to make a connection (ODBC) using script rather than pass through queries to update and retrieve data, is this possible?

If it is possible how and where would I place the code.

I currently make a connection using MySQL ODBC 3.51 Driver- DSN Configuration (Access inbuilt facility) but each time I open the database I am asked to enter the "UserName" into the MySQL Connection Parameters. OK while I am the only user but in time I aim to have multi users. Hence I would rather build the connection script into each relevant form \ query.
Try:
Driver={MySQL ODBC 3.51 Driver};Server=data.domain.com;Port=3306;Database= myDataBase;User=myUsername;Password=myPassword;Opt ion=3;
Apr 11 '07 #2
Try:
Driver={MySQL ODBC 3.51 Driver};Server=data.domain.com;Port=3306;Database= myDataBase;User=myUsername;Password=myPassword;Opt ion=3;
Thanks I will give it a go, but do I place the code in the VB of a form or a query, sorry but I am a bit of a beginner.
Apr 11 '07 #3
ADezii
8,834 Expert 8TB
Thanks I will give it a go, but do I place the code in the VB of a form or a query, sorry but I am a bit of a beginner.
This is a Connection String, and as so I would assume that it contained within a Form's or Standard code module.
Apr 11 '07 #4
pks00
280 Expert 100+
Question

u say u have uploaded an mdb to a server, but the connection string is for mysql

what backend database are you using exactly?

U could check out http://www.connectionstrings.com/ which has a whole host of info
Apr 11 '07 #5
Question

u say u have uploaded an mdb to a server, but the connection string is for mysql

what backend database are you using exactly?

U could check out http://www.connectionstrings.com/ which has a whole host of info
The database is MS Access 2000 using a MySQL server.

I will check out the website,

Thanks.
Apr 11 '07 #6
pks00
280 Expert 100+
So you got Access 2000, placed on a server
I assume then this has linked tables to MySQL (and not SQL Server) ?

this is a shared database?
Apr 11 '07 #7
So you got Access 2000, placed on a server
I assume then this has linked tables to MySQL (and not SQL Server) ?

this is a shared database?

I have a MS Access database on my pc with the tables on a server (MySQL), I link the tables currently using MS Access built in facilities. I would like to avoid this and connect to the server using SQL in my forms and queries. My database in not shared at this moment but my intention is to share at some point when the thing is finished!

I feel I will have more options available by connecting myself, apart from the fact I am curious now as to how I should write the program.

Hope this makes sense.
Apr 11 '07 #8
pks00
280 Expert 100+
Not sure why u wanna go that approach, seems a lot of work and headache

As I would see it is you would create a ODBC setting on all client PC's. This ODBC setting will have the same DSN name on all PC's. MySQL uses this ODBC DSN setting to create your linked tables.

You then dish out this database, each user requiring their own ODBC setting of course.

it is better to have multiple databases than one shared one, mainly due to the fact that shared databases are more likely to get corrupt.
Apr 11 '07 #9
Not sure why u wanna go that approach, seems a lot of work and headache

As I would see it is you would create a ODBC setting on all client PC's. This ODBC setting will have the same DSN name on all PC's. MySQL uses this ODBC DSN setting to create your linked tables.

You then dish out this database, each user requiring their own ODBC setting of course.

it is better to have multiple databases than one shared one, mainly due to the fact that shared databases are more likely to get corrupt.
Do you mean to continue using the microsoft ODBC connection within Access? If so how can I get the "DSN Configuration" (MySQL Connection Parameters) to remember the User name as each time I open the database it requests this info, all other data is OK ie. Server Name, Database Name & Password.

Really appreciate your assistance and patience!
Apr 11 '07 #10

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

Similar topics

7
by: Chris | last post by:
Hello, I posted a while back about a newbie database question and got a lot of great help here. My script that I am creating has come a long way (For me!) and almost does what I need it too. I...
33
by: Savas Ates | last post by:
in asp page im getting this error how can i solve it.. yesterday the codes work but i setup visual studio 6.0 now it doesnt works..
1
by: Rick Hickerson | last post by:
I can't get PHP to connect to DB2 on the same server. I'm running both Apache/PHP and DB2 on Mandrake Linux 9.2. I didn't compile PHP; just installed what appear to be the appropriate RPMs (I...
5
by: Kona | last post by:
Hello, Is it right to tell that DB2 Connect has the same function that Oracle Net ? If I have an ODBC application is it also right to tell that I have 2 possibilities on my client workstation to...
4
by: Development at American Savings | last post by:
I'm having some trouble being able to connect to my db2 server (it lives on an os/2 warp 3 connect box) from my Windows2000 workstation using vs.net 2003. Any suggestions? I have a local user...
3
by: Fabian Knopf | last post by:
Hi friends, i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) . Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On PC2 i installed unixODBC. To...
3
by: Dave F. | last post by:
I am using ODBC to connect to dBase data on a remote server. The ASP.NET app will be running on Win 2k or 2003 server. I have tried to make it work but all I can get is an error. ...
2
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data...
1
by: ~john | last post by:
I just installed PHP 5.1.4 with SQL Server 2005 on my laptop. PHP is running fine and so is SQL Server 2005. When I try to connect to SQL Server from my my PHP code I get this error. Warning:...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.