Subject Re: VB6 Connection String
Author Javier Soques
--- In firebird-support@yahoogroups.com, Sivarasa Visakan
<visakan13@...> wrote:
>
> Hello Tharan, Thankx for your suggestion
>
> I've tried the string:but when I run in vb6 I get the following
error; What do I do?
>
> Error Code : :0
> SOURCE: : Microsoft OLE DB Provider for ODBC Drivers
> DESCRIPTION : [Microsoft] [ODBC Driver Manager] Data source name not
found and no default driver specified
> HELP FILE :
> HELP CONTEXT : 0
>
> Thank you
>
> Tharen <tharen@...> wrote: pls try
this one
>
> conn.Open ("DRIVER=Firebird/InterBase(r) driver;
UID=SYSDBA;PWD=masterkey;
> DBNAME=Comm_5:C:\Firebird_Test\test.fdb;")
>
> ODBC version - Firebird_ODBC_2.0.0-Win32
> downloaded from http://www.firebirdsql.org
>
> here Comm_5 is computer name.
>
> tharen
>
>
> _____
>
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of visakan13
> Sent: 08 May 2007 06:49 AM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] VB6 Connection String
>
> Hi There,
>
> Does anyone know the connections String through vb6 for firebird &
> what is the ODBC driver I need to use?
>
> Thank you
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> ---------------------------------
> Yahoo! Answers - Got a question? Someone out there knows the
answer. Tryit now.
>
> [Non-text portions of this message have been removed]
>


Are you using the ODBC driver from IBPhoenix? If yes then this code
sample should work:

Create a simple VB6 project and add the Microsoft DataGrid Control 6
(ADO) and a reference to the Microsoft ActiveX Dataobjects 2.x

'------------------

Private Sub Command1_Click()

Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset

conn.Open "Provider=MSDASQL.1;Password=masterkey;Persist Security
Info=False;User ID=SYSDBA;Extended
Properties='Driver=Firebird/InterBase(r)
driver;Dbname=d:\data\test.fdb;CHARSET=NONE;UID=SYSDBA;Role=admin;Client=C:\Program
Files\Firebird\Firebird_2_0\bin\fbclient.dll'"

Set rs = conn.OpenSchema(adSchemaTables)

Set Me.DataGrid1.DataSource = rs

End Sub

'----------------------

Note that the line starting with conn.Open should be type in one line.
Replace the value for Dbname, Password, ID and Client with your own
values.

HTH
Javier