Friday, February 24, 2012

cannot insert to db

Cannot get insert sql to work or stored procedures for some reason. They used to

work perfectly two weeks ago. All connection strings look good.....web config ok.

Can any one suggest where I might check next... Select statements are pulling data

ok from db.....run out of ideas

heres my web config......

I did move my application into another directory.....does this second connection string connect to that new instance of sql server?

<

configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<

connectionStrings>

<

addname="Databasest1000ConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Documents and Settings\richard\My Documents\Visual Studio 2005\WebSites\st1000\App_Data\Databasest1000.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="ConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Databasest1000.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />

</

connectionStrings>|||

Hi,

Please check if you have permission to read and write to

C:\Documents and Settings\richard\My Documents\Visual Studio 2005\WebSites\st1000\App_Data\Databasest1000.mdf

for the ASPNET or NETWORK SERVICE account. I would suggest you put the .mdf file in App_Data folder instead of the folder under documents and settings.

|||

Hi Kevin

Thanks so much for reply.......I,m six months into project and its like someone has turned the light off.

""""Please check if you have permission to read and write to

C:\Documents and Settings\richard\My Documents\Visual Studio 2005\WebSites\st1000\App_Data\Databasest1000.mdf""

how do I do that

|||Go to the folder C:\Documents and Settings\richard\My Documents\Visual Studio 2005\WebSites\st1000\App_Data\, then right click with your mouse on Databasest1000.mdf file and click on Properties. Finally click on the tab Security.|||

I appear to have four group or user names.....strange...where have they come from

1. Administrators(DICKSLAPTOP\Administrators)

2. richard(DICKSLAPTOP\richard)

3. SYSTEM

4. Users(DICKSLAPTOP\Users)

Only the last one ....... (4.)........allows full control.....

all others are greyed out.......1. 2 3.

|||

under the advanced tab.....where 5x named users are listed

the last one Users(DICKSLAPTOP\Users).....seems to be read and execute...only

No comments:

Post a Comment