<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Access and ObjectDataSource Control</title><link>http://forums.asp.net/23.aspx</link><description>Questions and discussions related to using ADO.NET for data access, and the ObjectDataSource control. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=9&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Problem in connecting DataBase through ODBC</title><link>http://forums.asp.net/thread/904444.aspx</link><pubDate>Sat, 23 Apr 2005 20:49:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:904444</guid><dc:creator>Caddre</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/904444.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=904444</wfw:commentRss><description>&lt;P&gt;Try this url for samples with DSN.&amp;nbsp; Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.carlprothman.net/Default.aspx?tabid=81"&gt;http://www.carlprothman.net/Default.aspx?tabid=81&lt;/A&gt;&lt;/P&gt;</description></item><item><title>Problem in connecting DataBase through ODBC</title><link>http://forums.asp.net/thread/904186.aspx</link><pubDate>Sat, 23 Apr 2005 10:29:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:904186</guid><dc:creator>adnan152</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/904186.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=904186</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Hii,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I am using DBase database throught Odbc in ASP.NET. But it gives following error&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;&lt;EM&gt;&lt;FONT color=#ff0000&gt;ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000 size=2&gt;Note that, I have applied same code in WindowApplication using&amp;nbsp; C#. In WindowApplication it works properly and gives no error. It gives error olny&amp;nbsp;in WebApplication. I have also tried Access Database using Odbc&amp;nbsp;in ASP.NET and WindowApplication. Here is also the same problem.&lt;img src="/emoticons/emotion-6.gif" alt="Sad [:(]" /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;My code is here for binding data in DataGrid.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt; BindDg()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT face=Verdana&gt; conStr = "MaxBufferSize=2048;FIL=dBase 5.0;DSN=newdbase;PageTimeout=5;DefaultDir=C:\\ORIGINAL;DBQ=C:\\ORIGINAL;DriverId=533";&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;OdbcConnection con = &lt;/FONT&gt;&lt;FONT face=Verdana color=#0000ff&gt;new&lt;/FONT&gt;&lt;FONT face=Verdana&gt; OdbcConnection(conStr);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT face=Verdana&gt; qry = "SELECT ACCOUNTNO, COMPANY, CONTACT FROM Contact1";&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;OdbcCommand cmd = &lt;/FONT&gt;&lt;FONT face=Verdana color=#0000ff&gt;new&lt;/FONT&gt;&lt;FONT face=Verdana&gt; OdbcCommand();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;cmd.CommandText = qry;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;cmd.Connection = con;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;OdbcDataAdapter adapter = &lt;/FONT&gt;&lt;FONT face=Verdana color=#0000ff&gt;new&lt;/FONT&gt;&lt;FONT face=Verdana&gt; OdbcDataAdapter();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;adapter.SelectCommand = cmd;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana&gt;DataSet ds = &lt;/FONT&gt;&lt;FONT face=Verdana color=#0000ff&gt;new&lt;/FONT&gt;&lt;FONT face=Verdana&gt; DataSet();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;adapter.Fill(ds);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;this&lt;/FONT&gt;&lt;FONT face=Verdana&gt;.DataGrid1.DataSource = ds;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Verdana color=#0000ff&gt;this&lt;/FONT&gt;&lt;FONT face=Verdana&gt;.DataGrid1.DataBind();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;</description></item></channel></rss>