Error connectiong to database

H

helpful sql

Hi,
I am designing a webpage with the DbNetGrid control on it. I am folloing
its documentation and using the following connection string to connect the
grid control to a database:

'Provider=SQLOLEDB;Driver={SQL
Server};Server=(local);Database=pubs;Trusted_Connection=yes;'

But DbNetGrid keeps giving me the following error. I have tried different
variations of this connection string but nothing seems to work.

[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified (-2147467259)

Thanks.
 
S

Sericinus hunter

helpful said:
Hi,
I am designing a webpage with the DbNetGrid control on it. I am folloing
its documentation and using the following connection string to connect the
grid control to a database:

'Provider=SQLOLEDB;Driver={SQL
Server};Server=(local);Database=pubs;Trusted_Connection=yes;'

But DbNetGrid keeps giving me the following error. I have tried different
variations of this connection string but nothing seems to work.

[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified (-2147467259)

You have to create ODBC Data Source object as the message states.
Look for Data Sources icon in the Control Panel/Administrative Tools.
Then use its name in the connection string.
 
J

Jeff Dillon

Not neccessarily.

http://www.connectionstrings.com

And no need really to cross-post so much!

Jeff

Sericinus hunter said:
helpful said:
Hi,
I am designing a webpage with the DbNetGrid control on it. I am
folloing its documentation and using the following connection string to
connect the grid control to a database:

'Provider=SQLOLEDB;Driver={SQL
Server};Server=(local);Database=pubs;Trusted_Connection=yes;'

But DbNetGrid keeps giving me the following error. I have tried different
variations of this connection string but nothing seems to work.

[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified (-2147467259)

You have to create ODBC Data Source object as the message states.
Look for Data Sources icon in the Control Panel/Administrative Tools.
Then use its name in the connection string.
 
S

Sericinus hunter

Jeff said:

Thanks, I did not know that.
And no need really to cross-post so much!

I hope your intention was to say that to the original poster.
Jeff

Sericinus hunter said:
helpful said:
Hi,
I am designing a webpage with the DbNetGrid control on it. I am
folloing its documentation and using the following connection string to
connect the grid control to a database:

'Provider=SQLOLEDB;Driver={SQL
Server};Server=(local);Database=pubs;Trusted_Connection=yes;'

But DbNetGrid keeps giving me the following error. I have tried different
variations of this connection string but nothing seems to work.

[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified (-2147467259)
You have to create ODBC Data Source object as the message states.
Look for Data Sources icon in the Control Panel/Administrative Tools.
Then use its name in the connection string.
 
H

helpful sql

No, I had already tried this website and all their examples for Sql Server
2000 connection strings. They did work from my test application but they did
not work with DbNetGrid. I had to create an ODBC Data Source in
Administrative Tools. Then it worked fine.

Thanks all for help.

Sericinus hunter said:
Jeff said:

Thanks, I did not know that.
And no need really to cross-post so much!

I hope your intention was to say that to the original poster.
Jeff

Sericinus hunter said:
helpful sql wrote:
Hi,
I am designing a webpage with the DbNetGrid control on it. I am
folloing its documentation and using the following connection string to
connect the grid control to a database:

'Provider=SQLOLEDB;Driver={SQL
Server};Server=(local);Database=pubs;Trusted_Connection=yes;'

But DbNetGrid keeps giving me the following error. I have tried
different variations of this connection string but nothing seems to
work.

[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified (-2147467259)
You have to create ODBC Data Source object as the message states.
Look for Data Sources icon in the Control Panel/Administrative Tools.
Then use its name in the connection string.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top