Friday, March 9, 2012

Error connectiong to database

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;Tru
sted_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.helpful sql wrote:
> Hi,
> I am designing a webpage with the DbNetGrid control on it. I am folloin
g
> 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;Tru
sted_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.|||Not neccessarily.
http://www.connectionstrings.com
And no need really to cross-post so much!
Jeff
"Sericinus hunter" <serhunt@.flash.net> wrote in message
news:a2P_f.23982$NS6.16336@.newssvr30.news.prodigy.com...
> helpful sql wrote:
> 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.|||Jeff Dillon wrote:
> Not neccessarily.
> http://www.connectionstrings.com
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" <serhunt@.flash.net> wrote in message
> news:a2P_f.23982$NS6.16336@.newssvr30.news.prodigy.com...
>|||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" <serhunt@.flash.net> wrote in message
news:ACR_f.3328$mu2.302@.newssvr24.news.prodigy.net...
> Jeff Dillon wrote:
> Thanks, I did not know that.
>
> I hope your intention was to say that to the original poster.
>

No comments:

Post a Comment