Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 9 Oct 2008 23:04:23 -0400,    group: microsoft.public.dotnet.framework.adonet        back       


VS 2008 Data Access Issues   
I'm an occassional programmer who has been playing around with C#.

I've built database applications before, but running into problems with C# 
and using data access controls to do a simple thing like display the data in 
the datagridview control.

I'm using an Access database as the backend data store and I am able to 
preview the data in the tables in design mode but when the application runs 
no data is displayed. The datanavigation control shows no records either and 
when I attempt to add a record it is not saved.

I know I'm missing something, but I'm at a lost at this point. A search of 
MSDN doesn't appear to help. It appears I'm doing everything right.

VS 2008
C#
Jet 4.0
Access 2007 database


Thoughts
date: Thu, 9 Oct 2008 23:04:23 -0400   author:   Wesley Peace

Re: VS 2008 Data Access Issues   
First place to check is the connection string. Second is permissions on the 
Access file and directory it sits in. Third is to make sure nobody has the 
database open, or it is set up for multiple users.

If that does not work, post more.

-- 
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box!                               |
********************************************
"Wesley Peace"  wrote in message 
news:%23uP1mToKJHA.456@TK2MSFTNGP06.phx.gbl...
> I'm an occassional programmer who has been playing around with C#.
>
> I've built database applications before, but running into problems with C# 
> and using data access controls to do a simple thing like display the data 
> in the datagridview control.
>
> I'm using an Access database as the backend data store and I am able to 
> preview the data in the tables in design mode but when the application 
> runs no data is displayed. The datanavigation control shows no records 
> either and when I attempt to add a record it is not saved.
>
> I know I'm missing something, but I'm at a lost at this point. A search of 
> MSDN doesn't appear to help. It appears I'm doing everything right.
>
> VS 2008
> C#
> Jet 4.0
> Access 2007 database
>
>
> Thoughts
>
date: Thu, 9 Oct 2008 22:29:37 -0500   author:   Cowboy \(Gregory A. Beamer\) oSpamM

Re: VS 2008 Data Access Issues   
Connection string is pretty generic and doing a preview on the data does ope 
the table successfully. So I am able to access the database but only in 
design mode. I also tested the connection so I know that is working.

This is sitting on my desktop so permissions should not be an issue. I've 
also tried recreating this in VB and on a different machine. Believe it or 
not I tried SQL Compact edition and noticed the same problem.

An interesting note is in prior versions of VB I was able to drag the tables 
over to the form. Now I'm not. The Walktrhrough docs say this is possible.

I'll check the latter two items again, but I'm the only one using this 
database and the machine it's sitting on.



"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in 
message news:eIJ3nhoKJHA.4280@TK2MSFTNGP04.phx.gbl...
> First place to check is the connection string. Second is permissions on 
> the Access file and directory it sits in. Third is to make sure nobody has 
> the database open, or it is set up for multiple users.
>
> If that does not work, post more.
>
> -- 
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://feeds.feedburner.com/GregoryBeamer#
>
> or just read it:
> http://feeds.feedburner.com/GregoryBeamer
>
> ********************************************
> | Think outside the box!                               |
> ********************************************
> "Wesley Peace"  wrote in message 
> news:%23uP1mToKJHA.456@TK2MSFTNGP06.phx.gbl...
>> I'm an occassional programmer who has been playing around with C#.
>>
>> I've built database applications before, but running into problems with 
>> C# and using data access controls to do a simple thing like display the 
>> data in the datagridview control.
>>
>> I'm using an Access database as the backend data store and I am able to 
>> preview the data in the tables in design mode but when the application 
>> runs no data is displayed. The datanavigation control shows no records 
>> either and when I attempt to add a record it is not saved.
>>
>> I know I'm missing something, but I'm at a lost at this point. A search 
>> of MSDN doesn't appear to help. It appears I'm doing everything right.
>>
>> VS 2008
>> C#
>> Jet 4.0
>> Access 2007 database
>>
>>
>> Thoughts
>>
>
date: Fri, 10 Oct 2008 01:43:01 -0400   author:   Wesley Peace

Re: VS 2008 Data Access Issues   
If a website:
The permissions you have to watch are the permissions for the account that 
ASP.NET runs under. If it cannot create a file in the directory or access 
the Access file, you will have a failure. The reason for write on the folder 
is the lock file is created when someone opens the database file, even from 
a website.

Otherwise:
Ensure you have all rights to write in the folder and non of your code is 
impersonating anyone else.

-- 
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box!                               |
********************************************
"Wesley Peace"  wrote in message 
news:O%23jIQspKJHA.5692@TK2MSFTNGP04.phx.gbl...
> Connection string is pretty generic and doing a preview on the data does 
> ope the table successfully. So I am able to access the database but only 
> in design mode. I also tested the connection so I know that is working.
>
> This is sitting on my desktop so permissions should not be an issue. I've 
> also tried recreating this in VB and on a different machine. Believe it or 
> not I tried SQL Compact edition and noticed the same problem.
>
> An interesting note is in prior versions of VB I was able to drag the 
> tables over to the form. Now I'm not. The Walktrhrough docs say this is 
> possible.
>
> I'll check the latter two items again, but I'm the only one using this 
> database and the machine it's sitting on.
>
>
>
> "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in 
> message news:eIJ3nhoKJHA.4280@TK2MSFTNGP04.phx.gbl...
>> First place to check is the connection string. Second is permissions on 
>> the Access file and directory it sits in. Third is to make sure nobody 
>> has the database open, or it is set up for multiple users.
>>
>> If that does not work, post more.
>>
>> -- 
>> Gregory A. Beamer
>> MVP, MCP: +I, SE, SD, DBA
>>
>> Subscribe to my blog
>> http://feeds.feedburner.com/GregoryBeamer#
>>
>> or just read it:
>> http://feeds.feedburner.com/GregoryBeamer
>>
>> ********************************************
>> | Think outside the box!                               |
>> ********************************************
>> "Wesley Peace"  wrote in message 
>> news:%23uP1mToKJHA.456@TK2MSFTNGP06.phx.gbl...
>>> I'm an occassional programmer who has been playing around with C#.
>>>
>>> I've built database applications before, but running into problems with 
>>> C# and using data access controls to do a simple thing like display the 
>>> data in the datagridview control.
>>>
>>> I'm using an Access database as the backend data store and I am able to 
>>> preview the data in the tables in design mode but when the application 
>>> runs no data is displayed. The datanavigation control shows no records 
>>> either and when I attempt to add a record it is not saved.
>>>
>>> I know I'm missing something, but I'm at a lost at this point. A search 
>>> of MSDN doesn't appear to help. It appears I'm doing everything right.
>>>
>>> VS 2008
>>> C#
>>> Jet 4.0
>>> Access 2007 database
>>>
>>>
>>> Thoughts
>>>
>>
>
>
date: Tue, 14 Oct 2008 15:31:34 -0500   author:   Cowboy \(Gregory A. Beamer\) oSpamM

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us