Search : in
By :

Connect database

Last answer on Sep 16, 2009 1:59:15 pm BST muthu, on Sep 27, 2008 1:54:25 pm BST 
 Report this message to moderators

Hello,
i am muthu. I would like to know how to connect the databse with visual basic 2008 express edition. Pl help me.

thanking you

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « connect database » in :
Connect a database (MDB) to excel Show[VBA] Connecting a database (MDB) to excel Below is a tips of how to connect an Access database (MDB) in an application excel Add reference Microsoft DAO object librairy X.X In a general module (eg Module1) paste the code below...
Connecting to Oracle via php ShowConnecting to Oracle via php Settings Requirements Example of code Settings Below is an article based on an example of connection to an Oracle database through a php script. However it is not designed to configure your oracle...
Start a database with a missing data file ShowStart a database with a missing data file In order to start an Oracle database with a misssing data file: First get connected to SQL*DBA or Server Manager and run "shutdown abort" Run startup mount Run the following...
Download MYSQL to Access Database File Converter ShowTo handle Access database is more flexible than to handle MYSQL that is why it would be better to use this latter. To convert your database, Sanmaxi has edited a powerful tool to meet your needs. MYSQL to Access Database File Converter is a...
Download Outlook Connector ShowConnector Microsoft Outlook allows to use Outlook 2003 or Outlook 2007 to access and manage freely your Windows Live Hotmail or Live Mail accounts, especially the contacts. Depending on the services, the calendar task synchronization and the notes...
Sharing an Internet connection ShowAdvantages If you have a local area network (two or more computers connected in a network) with one computer connected to the Internet (via a modem, using a cable, etc.), it may be useful to make the connection accessible to the other computers on...
DB9 connector ShowDB9 connector The DB9 (originally DE-9) connector is an analog 9-pin plug of the D-Subminiature connector family (D-Sub or Sub-D). The DB9 connector is mainly used for serial connections, allowing for the asynchronous transmission of data as...

1

deep, on Jan 1, 2009 3:19:00 pm GMT
  • +2

Hi muthu,

have u installed odbc driver 3.51. if not then pls download it from www.mysql.com and install it. Then create a DSN from control panel-> administrartive tools -> data sources (ODBC).

And then paste below code in ur project:


Dim sqlstr As String
Dim rs As ADODB.Recordset
Dim conn As ADODB.Connection
conn = New ADODB.Connection
rs = New ADODB.Recordset
conn.Open("DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=urdatabasename;USER=ABC;PASSWORD=XYZ;OPTION=3;")
sqlstr = "select * from test_table"
rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient
rs.Open(sqlstr, conn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
MsgBox("success" & rs.RecordCount)

Reply to deep

6

Shadlan, on Mar 13, 2009 3:25:46 pm GMT
  • +8

Stating the obvious: MySql is not SQL-Server

Reply to Shadlan

7

evenderz, on Mar 15, 2009 12:21:12 pm GMT
  • +6

Hey where i should paste the codings tat yoo've provided...and also tell t full procedure to connect the oracle with asp.net.... please reply as its very urgent

Reply to evenderz

2

dudez, on Jan 7, 2009 3:57:14 am GMT

Ha???????/

Reply to dudez

3

sdsad, on Jan 21, 2009 12:24:15 pm GMT

<sosadsadsaduligne></souligne>

dasdsa

Reply to sdsad

4

room, on Feb 25, 2009 1:49:58 pm GMT

Hi

Reply to room

5

DB Prog, on Mar 4, 2009 5:36:41 pm GMT
  • +5

Seriously,

Did you even test this?


You're a moron

Reply to DB Prog

8

 Joe, on Sep 16, 2009 1:59:15 pm BST

Hi, muthu,
use ADODB.Connection
1) declare the variables e.g. Dim con as New ADODB.Connection
Dim rs as New ADODB.Recordset etc.
2)Open the database using the open method of the ADODB.eg.
Con.Open "enter the connection string here".

Reply to Joe