swargano1 0 Newbie Poster

I create new Vb 6 project and I want to connect to my server database how ?

I wrote in general Declarations
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim username As String
Dim passwd As String
Dim serverIP As String
Dim db As String
Dim ssql As String

and for connection
Set cn = New Connection
cn.Open = "DRIVER=MySQL;SERVER=0.0.0.0;Username=nabaadha_ADHAAR;PWD=123456;DATABASE=nabaadha_ADHAAR;databasesource=0.0.0.0"
Set rs = New Recordset
mysql = "select * from BRANCH"
rs.Open sql, cn, adOpenStatic, adLockOptimistic

is right or not ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.