Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connect to Linux DB using windows VB?

Status
Not open for further replies.

NicoleM

Programmer
Oct 18, 2001
23
0
0
ZA
hi

Anyone know of a way that a database on a linux box can be accessed by visual basic running on a windows box?
If not - I heard there is visual basic for linux - are the exact same components available to windows vb available for linux or do they have to be created?
Linux Db + VB????
 
I don't know anything about a VB for linux. You can certainly use a db on a linux box. Does depend what db it is though. Should it be MySql, it is easy. Use MyOdbc to create a connection. There are otehr methods as well if you don't want myodbc. Take a look on the mysql forum. Peter Meachem
peter@accuflight.com

 
Hi - ok, I have the correct details now - I need to connect to a unix db (Dbase4) on a unix box from an odbc connection on a windows pc... Any suggestions?
 
Did you make an ODBC datasource yet? If you can see the Unix box on the network, it shouldn't be a problem, provided you have the drivers for Db4 in your Win box's ODBC options. Onece that is accomplished, just use the DSN Name in your connection string in your VB project.
 
Depending on the Database Engine, and the network configuration, you may be able to connect using IP address. For example, I have a VB program which connects to a MySQL Database on a Linux machine using the following connection - Note that MyODBC has been installed on the client (VB) machine.

With gADO_OSCConn
.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
&quot;SERVER=<IP Address>;&quot; & _
&quot;DATABASE=<DatabaseName>;&quot; & _
&quot;UID=<UserName>;&quot; & _
&quot;PWD=<Password>;&quot; & _
&quot;OPTION=&quot; & Trim(<MySQL Option>)
.Open
End With Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks for all the replys!
I haven't got access to the database yet, but Im sure the information will be useful when I have.
 
LOL kbasic 1.0 doesnt come out until sometime in summer 2003 LOL
 
I'm sure you were looking to move your MS VBasic stuff to the Unix KBasic.

The only other option that comes to mind is using Glade for Linux (Red Had 7.2). This is a GUI development Env.

This may not be much help, but, just thought I'd let u know of another option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top