Subject | Re: VB6 Connection String |
---|---|
Author | Javier Soques |
Post date | 2007-05-09T20:46:41Z |
--- In firebird-support@yahoogroups.com, Sivarasa Visakan
<visakan13@...> wrote:
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
<visakan13@...> wrote:
>error; What do I do?
> Hello Tharan, Thankx for your suggestion
>
> I've tried the string:but when I run in vb6 I get the following
>found and no default driver specified
> Error Code : :0
> SOURCE: : Microsoft OLE DB Provider for ODBC Drivers
> DESCRIPTION : [Microsoft] [ODBC Driver Manager] Data source name not
> HELP FILE :this one
> HELP CONTEXT : 0
>
> Thank you
>
> Tharen <tharen@...> wrote: pls try
>UID=SYSDBA;PWD=masterkey;
> conn.Open ("DRIVER=Firebird/InterBase(r) driver;
> DBNAME=Comm_5:C:\Firebird_Test\test.fdb;")answer. Tryit now.
>
> 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
>Are you using the ODBC driver from IBPhoenix? If yes then this code
> [Non-text portions of this message have been removed]
>
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