dbTalk Databases Forums  

DSNless ODBC connection

comp.databases.ingres comp.databases.ingres


Discuss DSNless ODBC connection in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Patrick
 
Posts: n/a

Default DSNless ODBC connection - 12-17-2009 , 02:51 PM






Let me start by saying this is my first interaction with Ingres.

I have a client on Ingres 2.6. I am attempting to make dsn-less
connection to an Ingres database in my Windows application. I have
been successful at setting up the vnode, connecting using Visual DBA,
setting up odbc and testing the connection, and then connecting to the
database in my app using the odbc dsn.

Now, I am trying to figure out how to perform a dsn-less connection. I
am getting an error

User provided a vnode as part of the database name (vnode::dbname),
but connection information for that vnode is missing. Enter connection
information for the vnode using NETUTIL.

First I have some questions (again bear with me here). Can an ODBC
connection be made directly to the database without using the vnode?
The vnode is setup on my local machine, and it seems that odbc is
making a connection to it first and going through the vnode before
hitting the database server. Can I bypass it?

All other odbc drivers that I've worked with allow you to interact
directly with the target database server. Can this be done with the
Ingres ODBC driver? If so, would the connection string look like?

Thanks,
Patrick

Reply With Quote
  #2  
Old   
Paul White
 
Posts: n/a

Default Re: [Info-Ingres] DSNless ODBC connection - 12-17-2009 , 03:56 PM






Hi Patrick,

ODBC connections need to go through the vnode on the client.
A JDBC / .NET connection can connect directly without needing a vnode
providing you are running jdbc server component (2.6) or Data Access Server
(9.x)

What is your client application?

Make sure you have the latest ODBC patch installed.
For Ingres 2.6 my old notes say Patch 9885.
It's a good idea to contact Ingres Support.

Regards

Paul White


-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Patrick
Sent: Friday, 18 December 2009 6:51 AM
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] DSNless ODBC connection

Let me start by saying this is my first interaction with Ingres.

I have a client on Ingres 2.6. I am attempting to make dsn-less
connection to an Ingres database in my Windows application. I have
been successful at setting up the vnode, connecting using Visual DBA,
setting up odbc and testing the connection, and then connecting to the
database in my app using the odbc dsn.

Now, I am trying to figure out how to perform a dsn-less connection. I
am getting an error

User provided a vnode as part of the database name (vnode::dbname),
but connection information for that vnode is missing. Enter connection
information for the vnode using NETUTIL.

First I have some questions (again bear with me here). Can an ODBC
connection be made directly to the database without using the vnode?
The vnode is setup on my local machine, and it seems that odbc is
making a connection to it first and going through the vnode before
hitting the database server. Can I bypass it?

All other odbc drivers that I've worked with allow you to interact
directly with the target database server. Can this be done with the
Ingres ODBC driver? If so, would the connection string look like?

Thanks,
Patrick
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres

Reply With Quote
  #3  
Old   
Jamesb
 
Posts: n/a

Default Re: DSNless ODBC connection - 12-18-2009 , 06:20 AM



You don't need a DSN or a VNODE as you can specify all the details
directly (but you do need the IngresNet client installed on the PC and
running i.e. iigcc and iigcn running).

The VB6 code below works for me. hostname is your db server hostname,
II is the listen address, iidbdb is the database name you want to
connect to + username and password should be obvious.


Dim objC As New ADODB.Connection
Dim objRs As ADODB.Recordset

objC.Open
("DRIVER=Ingres;SRVR=@hostname,wintcp,II;DB=iidbdb ;UID=username;PWD=password")

objC.BeginTrans

Set objRs = objC.Execute("select table_name from iitables")

Debug.Print objRs(0)

objC.CommitTrans

objC.Close

Hope that helps.

On 17/12/2009 20:51, Patrick wrote:
Quote:
Let me start by saying this is my first interaction with Ingres.

I have a client on Ingres 2.6. I am attempting to make dsn-less
connection to an Ingres database in my Windows application. I have
been successful at setting up the vnode, connecting using Visual DBA,
setting up odbc and testing the connection, and then connecting to the
database in my app using the odbc dsn.

Now, I am trying to figure out how to perform a dsn-less connection. I
am getting an error

User provided a vnode as part of the database name (vnode::dbname),
but connection information for that vnode is missing. Enter connection
information for the vnode using NETUTIL.

First I have some questions (again bear with me here). Can an ODBC
connection be made directly to the database without using the vnode?
The vnode is setup on my local machine, and it seems that odbc is
making a connection to it first and going through the vnode before
hitting the database server. Can I bypass it?

All other odbc drivers that I've worked with allow you to interact
directly with the target database server. Can this be done with the
Ingres ODBC driver? If so, would the connection string look like?

Thanks,
Patrick

Reply With Quote
  #4  
Old   
Ingres Forums
 
Posts: n/a

Default Re: DSNless ODBC connection - 12-18-2009 , 09:52 AM



I do not think that VB code uses ODBC driver. It probably uses .NET
driver, which establishes direct connection to the RDBMS...


--
dejan

Reply With Quote
  #5  
Old   
Ingres Forums
 
Posts: n/a

Default Re: DSNless ODBC connection - 12-18-2009 , 10:00 AM



--------------------------------------------------------------------------------

Quote:
I do not think that VB code uses ODBC driver. It probably uses .NET
driver, which establishes direct connection to the RDBMS...
This depends on the VB version. VB6 definitely doesn't use the .NET
driver.
The preferred method there is to use ADODB as in Jamesb's example


--
Bodo

Reply With Quote
  #6  
Old   
Jamesb
 
Posts: n/a

Default Re: DSNless ODBC connection - 12-20-2009 , 05:26 AM



Quote:
I do not think that VB code uses ODBC driver. It probably uses .NET
driver, which establishes direct connection to the RDBMS...
My example was definitely VB6 code using the Ingres ODBC driver (and
Ingres Net) and not using the .NET Dataprovider and it's associated
iigcd server side process.

I was just illustrating the fact that you don't actually need to create
an ODBC Datasource (DSN) or an Ingres VNODE as you can include all the
required details in the connection string. But you do have to have
Ingres Net and the ODBC driver installed on each local PC where you want
the code to run.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.