Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Registry free DB Connection.

 
   Database Help (Home) -> General Discussion RSS
Next:  Toolbars Move???  
Author Message
oakulkarni

External


Since: Oct 01, 2008
Posts: 3



(Msg. 1) Posted: Tue Oct 21, 2008 2:01 am
Post subject: Registry free DB Connection.
Archived from groups: comp>databases (more info?)

Hi,

My application needs database. We use SQLConnect to connect to
database through DSN. The SQLConnect uses the registry to look the DSN
entries. What i want to do is the, connect to the DB without registry.
We ship the database connection drivers with our product. I even tried
to use the SQLDriverConnect, in this i had provided all the connection
paramters but still it takes the Driver info from registry. Is it
possible to provide the whole path of the driver in the connection
string while connecting e.g. SQLDriverConnect(...,DRIVER="...../
odbc.dll,.....) I tried FileDSN but that also not working. FileDSN is
not actually registry free connection. It also looks for the DB
Driver in the registry.
Please, if anybody is having any info please let me know.

Thanks,
Omkar

 >> Stay informed about: Registry free DB Connection. 
Back to top
Login to vote
Tony Toews [MVP]

External


Since: Nov 15, 2007
Posts: 1217



(Msg. 2) Posted: Tue Oct 21, 2008 6:25 pm
Post subject: Re: Registry free DB Connection. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

oakulkarni wrote:

>My application needs database. We use SQLConnect to connect to
>database through DSN. The SQLConnect uses the registry to look the DSN
>entries. What i want to do is the, connect to the DB without registry.
>We ship the database connection drivers with our product. I even tried
>to use the SQLDriverConnect, in this i had provided all the connection
>paramters but still it takes the Driver info from registry. Is it
>possible to provide the whole path of the driver in the connection
>string while connecting e.g. SQLDriverConnect(...,DRIVER="...../
>odbc.dll,.....) I tried FileDSN but that also not working. FileDSN is
>not actually registry free connection. It also looks for the DB
>Driver in the registry.

The following links are all for Access The key line in the first link is
tdfCurrent.Connect = "ODBC;DRIVER={sql server};DATABASE=" & _
DatabaseName & ";SERVER=" & ServerName & _
";Trusted_Connection=Yes;"
You will need to adapt that type of syntax to your programming language/environment
of course.

Using DSN-Less Connections
http://www.accessmvp.com/djsteele/DSNLessLinks.html
ODBC DSN-Less Connection Tutorial Part I
http://www.amazecreations.com/datafast/GetFile.aspx?file=ODBCTutor01.h...Article
HOWTO: Use "DSN-Less" ODBC Connections with RDO and DAO
http://support.microsoft.com/?id=147875
ODBC DSN Less
http://www.carlprothman.net/Default.aspx?tabid=81
Relink ODBC tables from code
http://www.mvps.org/access/tables/tbl0010.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

 >> Stay informed about: Registry free DB Connection. 
Back to top
Login to vote
oakulkarni

External


Since: Oct 01, 2008
Posts: 3



(Msg. 3) Posted: Wed Oct 22, 2008 9:16 am
Post subject: Re: Registry free DB Connection. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 22, 2:22 am, "Tony Toews [MVP]" wrote:
> oakulkarni wrote:
> >My application needs database. We use SQLConnect to connect to
> >database through DSN. The SQLConnect uses the registry to look the DSN
> >entries. What i want to do is the, connect to the DB without registry.
> >We ship the database connection drivers with our product. I even tried
> >to use the SQLDriverConnect, in this i had provided all the connection
> >paramters but still it takes the Driver info from registry. Is it
> >possible to provide the whole path of the driver in the connection
> >string while connecting e.g. SQLDriverConnect(...,DRIVER="...../
> >odbc.dll,.....) I tried FileDSN but that also not working. FileDSN is
> >not actually registry free connection.  It also looks for the DB
> >Driver in the registry.
>
> The following links are all for Access   The key line in the first link is
>     tdfCurrent.Connect = "ODBC;DRIVER={sql server};DATABASE=" & _
>                         DatabaseName & ";SERVER=" & ServerName & _
>                         ";Trusted_Connection=Yes;"
> You will need to adapt that type of syntax to your programming language/environment
> of course.
>
> Using DSN-Less Connectionshttp://www.accessmvp.com/djsteele/DSNLessLinks.html
> ODBC DSN-Less Connection Tutorial Part Ihttp://www.amazecreations.com/datafast/GetFile.aspx?file=ODBCTutor01....
> HOWTO: Use "DSN-Less" ODBC Connections with RDO and DAOhttp://support.microsoft.com/?id=147875
> ODBC DSN Lesshttp://www.carlprothman.net/Default.aspx?tabid=81
> Relink ODBC tables from codehttp://www.mvps.org/access/tables/tbl0010.htm
>
> Tony
> --
> Tony Toews, Microsoft Access MVP
>    Please respond only in the newsgroups so that others can
> read the entire thread of messages.
>    Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab.ca/accsmstr.htm
>    Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

Thanks for your reply. But I dont know how does this solve my problem.
Actually we use sysbase database. They have there own drivers. What i
just need to do is While connecting to database, i want to provide all
the parameters needed to connect. connection string e.g. driver (here
driver would be the full path of the dll rather than just
"ODBC;DRIVER={sql server}"), it would be like this Driver=C:/program
files/dbms/abc.dll , database server name, password etc. All the links
which u have mentioned directly/indirectly depend on registry. What i
want to do is connect to db without registry. it would be possible
that we dont want to install the driver and just use it. Is it
possible? it should be just plug-in and play sort of.

Thanks
 >> Stay informed about: Registry free DB Connection. 
Back to top
Login to vote
Tony Toews [MVP]

External


Since: Nov 15, 2007
Posts: 1217



(Msg. 4) Posted: Wed Oct 22, 2008 9:25 pm
Post subject: Re: Registry free DB Connection. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

oakulkarni wrote:

>Thanks for your reply. But I dont know how does this solve my problem.
>Actually we use sysbase database. They have there own drivers. What i
>just need to do is While connecting to database, i want to provide all
>the parameters needed to connect. connection string e.g. driver (here
>driver would be the full path of the dll rather than just
>"ODBC;DRIVER={sql server}"), it would be like this Driver=C:/program
>files/dbms/abc.dll , database server name, password etc. All the links
>which u have mentioned directly/indirectly depend on registry.

No, those links don't depend on the registry.. They all talk about how to set the
connection string in Access using VBA. Same idea for other apps.

>What i
>want to do is connect to db without registry. it would be possible
>that we dont want to install the driver and just use it. Is it
>possible? it should be just plug-in and play sort of.

Well, you're going to need drivers of some sort, be they built into the OS or
installed.

I'd suggest asking in a sysbase (or is that Sybase) newsgroup.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 >> Stay informed about: Registry free DB Connection. 
Back to top
Login to vote
Lee Fesperman

External


Since: Aug 10, 2003
Posts: 56



(Msg. 5) Posted: Wed Oct 22, 2008 11:16 pm
Post subject: Re: Registry free DB Connection. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

oakulkarni wrote:
> Hi,
>
> My application needs database. We use SQLConnect to connect to
> database through DSN. The SQLConnect uses the registry to look the DSN
> entries. What i want to do is the, connect to the DB without registry.
> We ship the database connection drivers with our product. I even tried
> to use the SQLDriverConnect, in this i had provided all the connection
> paramters but still it takes the Driver info from registry. Is it
> possible to provide the whole path of the driver in the connection
> string while connecting e.g. SQLDriverConnect(...,DRIVER="...../
> odbc.dll,.....) I tried FileDSN but that also not working. FileDSN is
> not actually registry free connection. It also looks for the DB
> Driver in the registry.
> Please, if anybody is having any info please let me know.

ODBC does not support "registry free" connections. There are two types
of ODBC registries: one for DSNs (Data Source Names) and one for
Drivers. You can have a DSN-less connection, but you must specify a
registered driver name instead. You do this with SQLDriverConnect()
and the DRIVER property. You can't use the path to the driver .dll to
connect.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
 >> Stay informed about: Registry free DB Connection. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Erwin modeling basic question - Hi, Can anyone tell me when doing db design in ERWin, how do you make the table column area longer so more attributes can be shown in the diagram? I thought it'd be as simple as dragging the lower corner of the table, but it didn't work. And I didn't....

number of attributes - Is there a maximum to how many attributes a table should have? I'm implementing a user-based web-application for school. Should I, for example, put all the user characteristics and preferences in one table or should I split it in multiple tables.

History function - G'day, First of all, I'm using PostgreSQL 8.0.1 on a Debian Linux machine. I've got to set up a database which as well features some sort of history function. For example, if there's a table tbl_persons like: id | name | surname | ... there should b...

looking for a tool/ middleware tool which... - Hi all. I'm looking for a tool which should act like some kind of middleware/ logical layer bewtween the SQL server and the webbased user interface. - It should be possible to easily create simple web forms (only data input and output) without..

Designing large databases - Hi, I don't know how to formulate this question, so I try this and see where it ends. I want to create a database that will probably grow very big. How should I do? My database is a Mysql DB and it will store free text where you can search in it. //M
   Database Help (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]