Update Database Using Sqlceresultset

Aug 21, 2007

Hi,
I have an updateable sqlceresultset, which i use to bind to a datagrid. The user can modify values in the grid. I wish to update these values in the database only when the user has finished making these changes and clicks "Accept" button. But with the sqlceresultset, it looks like with every modification in the grid, the resultset is updated and change is written to the sdf database file . Please suggest how to work around this.

Thanks

View 1 Replies


ADVERTISEMENT

How To Update An SDF Database With A SqlCEResultSet

May 4, 2008

I have created my connection correctly
if (_deviceConn.State == ConnectionState.Closed)
_deviceConn.Open();

_deviceCMD = new SqlCeCommand("UPDATE metar SET observation='"+ Value1 +"',lastupdate='"+ Value2 +"',Valid_Time='"+ Value3+"' WHERE aerodrome_oaci_code='"+ FilterValue +"'", _deviceConn);

int RecordsAffected = _deviceCMD.ExecuteNonQuery();

The code executes fine, in fact the recordsaffected returns 1, but Nothing happend on database side. Another thing is, when i run the project on release mode, a copy of the SDF file is there, so, which of the sdf files the project is actually updating?, cause im querying both (the one in my project source path and the one copied to release folder) and both have the same data witout any modification.

My Copy to output directory setting is = Copy if newer.

If i try this with query analizer works just fine.

Any ideas?

View 1 Replies View Related

Update TextBox Binding To SQLCeResultSet

Jan 31, 2008

Hello,

I'm trying to develop a VB.NET (2005) form with just a ComBobox and a TextBox.

I bind a combobox with the SqlCeResultset (Scrollable | Updatable ). Do the same with the TextBox.
Combobox1.DataSource = rsResultSet
TextBox1.DataBindings.Add("Text", rsResultSet, "Obs")

This works (when I change the Combo item the textbox changes as well) but any changes to the textbox text do not reach the DB.If i change the Combobox item and back the old data is still there. If i look at the result
set it does appear as updateable.

How can I update the SqlCeResultset when I change the TextBox text?

Thanks

View 1 Replies View Related

SqlCeResultSet

Sep 13, 2007


How can i get the current row index of SqlCeResultSet specially after calling Seek method?

View 3 Replies View Related

SQLCeResultSet + Filter

May 17, 2007

Is there anyway to filter a existing SQLCEReusltSet?

View 1 Replies View Related

Paging On SqlCeResultSet

Aug 17, 2007

Hi

I am using SqlCeResult and i want to give paging on that and read in help that you can do paging on ResultSet so . I need code example so that i can understand how to implement this in resultSet.


Thanks & Regards
Vishal

View 4 Replies View Related

Insert Identity Value With SqlCeResultSet

Aug 20, 2007

Hi

I have a table with an identity column. This is set to increase by 1 and start on 1, and is the first column of the table.
When I insert a record into the resultset, I get an error stating that it can't be DbNull.
Th record is created from a resultset with the query "Select * from table", so the id should be included

But as I understand it, it should be increasing automatically, right? Becuase that's the behaviour of the normal sql Insert command. I have seen an article that just left the id column in the record alone before inserting it, but it didn't help me.
How can I sidestep this issue?

View 4 Replies View Related

SQLCeResultset, Connections And Performance

Sep 25, 2007

I am currently working with typed sqlceresultsets. I noticed that each resultset manages its own databaseconnection. I am considering to change this to a situation where I can reuse a databaseconnection on more than one sqlresultset.
Will this result in better performance? for example, when I have 2 updates for wicht I need 2 resultsets, wouldn't it be better to use 1 connection and transaction instead of each resultset creating/disposing its own? I would realy like to hear some oppinions. thanks!

View 4 Replies View Related

SqlCeResultSet Performance Vrs OLEDB

May 23, 2007

Hi I have written an Windows Mobile Application that insert 1000 records on SQL Compact 3.1 but I am having performance issues. If I use SqlCeResultSet and SqlCeUpdatableRecord in C# tha insert take 7 seconds to complete. But if I write a C++ application that uses OLEDB it takes only 4 seconds.



How can I improve the performance of the C# application? Also I would like to know if there is any possibility to use the same OLEDB objects that I use in C++ in a C# application.



Thanks a lot

View 4 Replies View Related

SqlCeResultSet - Problem After Deleting First Record

Oct 4, 2006



Hi,

I've noticed that after the first record from a ResultSet is deleted, HasRows property throws an exception like "The current row was deleted." Method ReadFirst() throws similar exception as well.

More details:

1. Create a ResultSet: ExecuteResultSet(ResultSetOptions.Updatable | ResultSetOptions.Scrollable | ResultSetOptions.Sensitive)

2. Let's say, there is no records in the resultset. Insert two new ones. Then call: ReadAbsolute(0); Delete(); HasRows; and the exception is thrown.

3. Then you can call ReadFirst() or Read with the same result.

4. Now call ReadAbsolute(0). It returns true. Call HasRows, ReadFirst() or Read() and you will get the exception each time.

I tried to explain this with the fact that Delete() doesn't change the current position of the ResultSet. But I don't see why that would mess the HasRows property or why after ReadAbsolute(0) retuns true, HasRows or ReadFirst() doesn't work.

Could anybody tell me what the problem is?

Thank you.

View 7 Replies View Related

SQL Mobile - SQLCEResultSet - Fast Retreival

May 23, 2007

Hi,



I am trying to develope a Pocket PC application using MS Visual Studio 2005 (C#)and the database is in the device (.sdf file).



Am trying to retreive a single row from a table containing around 10000 rows. I would like to know the fastest method to retreive the values.



whether it is faster to use an SQLDataAdapter to retreive the values to a dataset or datatable OR retreive the values to a SQLCEResultSet OR is there any other faster retreival method.



Please advice



Thanks,



Anujith



View 3 Replies View Related

SqlCeResultSet - Problem After Deleting First Record

Oct 3, 2006

Hi,

I've noticed that after the first record from a ResultSet is deleted, HasRows property throws an exception like "The current row was deleted."   Method ReadFirst() throws similar exception as well.

More details:

1. Create a ResultSet: ExecuteResultSet(ResultSetOptions.Updatable | ResultSetOptions.Scrollable | ResultSetOptions.Sensitive)

2. Let's say, there is no records in the resultset.  Insert two new ones.  Then call: ReadAbsolute(0); Delete(); HasRows; and the exception is thrown.

3. Then you can call ReadFirst() or Read with the same result.

4. Now call ReadAbsolute(0).  It returns true.  Call HasRows, ReadFirst() or Read() and you will get the exception each time.

I tried to explain this with the fact that Delete() doesn't change the current position of the ResultSet.  But I don't see why that would mess the HasRows property or why after ReadAbsolute(0) retuns true, HasRows or ReadFirst() doesn't work.

Could anybody tell me what the problem is?

Thank you.

 

View 1 Replies View Related

Obtain Sqlceresultset Table Schema With GetSchemaTable

May 4, 2006

I have a SqlCeResult pointing to a table :



Public conexion As Data.SqlServerCe.SqlCeConnection = New Data.SqlServerCe.SqlCeConnection("Data Source=iPAQ File StoreGestionAlmacenN.sdf")

Public ComandoCargaProductos As Data.SqlServerCe.SqlCeCommand = conexion.CreateCommand

Public ResultSetProductos As Data.SqlServerCe.SqlCeResultSet

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

conexion.Open()

'**********************************************************

'************Conexion con Tabla Productos******************

'ComandoCargaProductos.CommandText = "SELECT * from [Productos]"

ComandoCargaProductos.CommandType = Data.CommandType.TableDirect

ComandoCargaProductos.IndexName = "PK__Productos__0000000000000041"

ComandoCargaProductos.CommandText = "Productos"

ResultSetProductos = ComandoCargaProductos.ExecuteResultSet(Data.SqlServerCe.ResultSetOptions.Scrollable Or Data.SqlServerCe.ResultSetOptions.Updatable)

End Sub

And I want to obtain the schema of the table which my resultset is pointing

Dim tabla As Data.DataTable

tabla = Me.ResultSetProductos.GetSchemaTable

But the datatable that i obtain don´t seem to have the schema that i need, for example don´t have the primary keys i have define and also don´t have any constrains......



Does anybody know the problem?



Thanks for your help

View 1 Replies View Related

SqlCeResultSet Looses Updatable Option If Query Has 2 Params

Feb 26, 2008

i have result set from such query :

resultSetOptions = System.Data.SqlServerCe.ResultSetOptions.Scrollable | System.Data.SqlServerCe.ResultSetOptions.Updatable;

queryText =
SELECT agvb_id as ID
,agvb_cat_id as Category
,agv_brn_id as Brand
,agvb_brn_name as BrandName
,agv_brn_area as Area
,agv_brn_sku_qty as SkuQuantity
,agv_brn_qty as Quantity
,agv_orderliness as Orderliness
,agvb_importance as Importance
FROM AGENTS_VISITS_BRANDS
WHERE (AGENTS_VISITS_BRANDS.agvb_agv_id = @agv_id)
AND (AGENTS_VISITS_BRANDS.agvb_cat_id = @dad_id)
ORDER BY agvb_brn_name

if i open resultSet with such qury it looses its updatable option.

If i remove from where 1 param (no mater which) everything runs ok.

View 1 Replies View Related

Unspecified Error When Inserting/updating Record Using SqlCeResultSet On Sql Compact

Nov 14, 2007

Hi,

Inside a single transaction I'm inserting/updating multiple records into multiple tables, in this order:
table 1 record 1
table 2 record 1
table 3 record 1
table 1 record 2
table 2 record 1
table 1 record 3
table 2 record 3
table 3 record 3


Now I'm getting an unspecified error on a certain table:

Unspecified error [ 3,-1300704038,-1834095882,activitypointerBase,x lock (x blocks),PAG (idx): 1078 ]


From msdn I see that:


PAG (idx) means a lock on an index page.

x lock means an exclusive lock:

Indicates a data modification, such as an insert, an update, or a deletion. Ensures that multiple updates cannot be made to the same resource at the same time. (I assume that multiple updates within the SAME transaction can be made, only multiple updates from different transaction cannot be made, right?)
I cannot find any reference to this error message and don't know what the numbers mean. Maybe it relates to data that can be found in the sys.lock_information table like explained here, http://technet.microsoft.com/en-us/library/ms172932.aspx, but I'm not sure.

Furthermore, the sys.lock_information table is empty. I haven't been able to reproduce the problem myself. I only received an error log and the database to investigate it.

So, does anybody have an idea what this error message means and what I can do to troubleshoot this?

Thanks,
Jeffry

View 3 Replies View Related

BindingSource ListChanged Does Not Fire For New Records In SqlCeResultSet With Sensitive Option

Nov 6, 2007

I have an updateable and sensitive SqlCeResultSet that is bound to a DataGrid via a BindingSource. All updates to the resultset are programmatic. Changes to an existing record in the resultset are visible in the DataGrid and I am getting corresponding ListChanged events fired from the BindingSource. When I perform an database update independent of the resultset that changes resultset membership, I can peform a ReadLast and see the additional records; however the ListChanged event does not fire. Also, when I explicitly "create" a new record in the resultset I do not get a ListChanged event and in both cases the DataGrid does not display the records. Re-binding to the existing resultset does not appear to work either. Only when I create a new resultset and bind do the new or records display.
Using Compact Framework 2.0.

Any suggestions are appreciated.

View 3 Replies View Related

Help Send An Personal Email From Database Mail On Row Update-stored PROCEDURE Multi Update

May 27, 2008

hi need help how to send an email from database mail on row update
from stored PROCEDURE multi update
but i need to send a personal email evry employee get an email on row update
like send one after one email


i use FUNCTION i get on this forum to use split from multi update

how to loop for evry update send an single eamil to evry employee ID send one email

i update like this


Code Snippet
:

DECLARE @id nvarchar(1000)
set @id= '16703, 16704, 16757, 16924, 17041, 17077, 17084, 17103, 17129, 17134, 17186, 17190, 17203, 17205, 17289, 17294, 17295, 17296, 17309, 17316, 17317, 17322, 17325, 17337, 17338, 17339, 17348, 17349, 17350, 17357, 17360, 17361, 17362, 17366, 17367, 17370, 17372, 17373, 17374, 17377, 17380, 17382, 17383, 17385, 17386, 17391, 17392, 17393, 17394, 17395, 17396, 17397, 17398, 17400, 17401, 17402, 17407, 17408, 17409, 17410, 17411, 17412, 17413, 17414, 17415, 17417, 17418, 17419, 17420, 17422, 17423, 17424, 17425, 17426, 17427, 17428, 17430, 17431, 17432, 17442, 17443, 17444, 17447, 17448, 17449, 17450, 17451'
UPDATE s SET fld5 = 2
FROM Snha s
JOIN dbo.udf_SplitList(@id, ',') split
ON split.value = s.na
WHERE fld5 = 3

now
how to send an EMAIL for evry ROW update but "personal email" to the employee



Code Snippet
DECLARE @xml NVARCHAR(MAX)DECLARE @body NVARCHAR(MAX)
SET @xml =CAST(( SELECT
FirstName AS 'td','',
LastName AS 'td','' ,
SET @body = @body + @xml +'</table></body></html>'
EXEC msdb.dbo.sp_send_dbmail
@recipients =''
@copy_recipients='www@iec.com',
@body = @body,
@body_format ='HTML',
@subject ='test',
@profile_name ='bob'
END
ELSE
print 'no email today'


TNX

View 2 Replies View Related

UPDATE SQL Statement In Excel VBA Editor To Update Access Database - ADO - SQL

Jul 23, 2005

Hello,I am trying to update records in my database from excel data using vbaeditor within excel.In order to launch a query, I use SQL langage in ADO as follwing:------------------------------------------------------------Dim adoConn As ADODB.ConnectionDim adoRs As ADODB.RecordsetDim sConn As StringDim sSql As StringDim sOutput As StringsConn = "DSN=MS Access Database;" & _"DBQ=MyDatabasePath;" & _"DefaultDir=MyPathDirectory;" & _"DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;" &_"PWD=xxxxxx;UID=admin;"ID, A, B C.. are my table fieldssSql = "SELECT ID, `A`, B, `C being a date`, D, E, `F`, `H`, I, J,`K`, L" & _" FROM MyTblName" & _" WHERE (`A`='MyA')" & _" AND (`C`>{ts '" & Format(Date, "yyyy-mm-dd hh:mm:ss") & "'})"& _" ORDER BY `C` DESC"Set adoConn = New ADODB.ConnectionadoConn.Open sConnSet adoRs = New ADODB.RecordsetadoRs.Open Source:=sSql, _ActiveConnection:=adoConnadoRs.MoveFirstSheets("Sheet1").Range("a2").CopyFromRecordset adoRsSet adoRs = NothingSet adoConn = Nothing---------------------------------------------------------------Does Anyone know How I can use the UPDATE, DELETE INSERT SQL statementsin this environement? Copying SQL statements from access does not workas I would have to reference Access Object in my project which I do notwant if I can avoid. Ideally I would like to use only ADO system andSQL approach.Thank you very muchNono

View 1 Replies View Related

Trigger To Update One Record On Update Of All The Tables Of Database

Jan 3, 2005

hi!

I have a big problem. If anyone can help.

I want to retrieve the last update time of database. Whenever any update or delete or insert happend to my database i want to store and retrieve that time.

I know one way is that i have to make a table that will store the datetime field and system trigger / trigger that can update this field record whenever any update insert or deletion occur in database.

But i don't know exactly how to do the coding for this?

Is there any other way to do this?

can DBCC help to retrieve this info?

Please advise me how to do this.

Thanks in advance.

Vaibhav

View 10 Replies View Related

Database Create ODBC Connections To Access Database Directly And Update Data?

Sep 10, 2012

We have a SQL database that uses Active Directory with Windows Authentication. Can users that are members of the Active Directory group that has read/write access to the SQL database create ODBC connections to access the database directly and update the data? They dont have individual logins on the server. They are only members of the Active Directory group that has a login?

View 1 Replies View Related

SQL Server 2008 :: How To Update The Database Physical File Location In Master Database

Mar 8, 2015

I had to to relocate the database log file and I issued an Alter database command but by mistake I put a space in the file name as below. The space is at the beginning file name. Now I am unable get the database loaded to SQL Server. The database has 2 replications configured, so deleting and re-attaching the database means the replication needs to be re-configured. Is there an alternative way to issue a command to update the database FILENAME ? Not sure if this can be edited in master database (sys files).

ALTER DATABASE [User_DB]
MODIFY FILE (NAME = User_DB_log, FILENAME = 'I:SQLLogs User_DB_log.ldf')
GO

View 1 Replies View Related

DB Design :: Buffer Database - Insert Information From Partners Then Make Update To Main Database

Oct 29, 2015

I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?

View 6 Replies View Related

Weekly Update Part Of Database With Data From Original Database

Mar 26, 2008

Hi!

I have an original database that I want to copy once to another database. Then I want to update the data weekly with the data of the original database. I don€™t change any tables or columns in that part of the database. Just some tables more in the €˜new€™ database (than the tables from the original database) with some references to the tables that have to be updated weekly.
How can I do this? (if you know what I mean... it's a sort of a datawarehouse where different sources come together.. that part that represents the original database is just a part of the datawarehouse. That part is exactly the same structure as the original database.)

Thanks,

Sandra

View 1 Replies View Related

How Can I Set A Update Trigger On A Table In Database A After A Record Had Been Updated From Another Database B?

Jan 22, 2008



Hi guys, may I know is it possible to create an update trigger like this ? Assuming there are two database, database A and database B and both are having same tables called 'Payments' table. I would like to update the Payments records on database A automatically after Payments records on database B had been updated. I can't use replication because both tables might having different records and some records are the same. Hope can get any assistance here, thank you.

Best Regards,
Hans

View 8 Replies View Related

Integration Services :: How To Insert / Update Table From Database 1 To Database 2

Oct 26, 2015

I am using two database server. Both are sql server. 

My task is :I want to insert data from server 1 table to server 2 table and update same when modified the existing data from server 1. is it possible to do the integration in single package.

I know to do insert and update seperately by ssis but need to do same with single task. 

View 5 Replies View Related

Failed To Update Database C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF Because The Database Is Read-only.

Mar 4, 2006

I'm new to ASP.NET (I normally work with Windows Forms) and have installed the Club Website Starter Kit. I created an Administrators role and a user called "admin". When I run the project locally, everything works as it should - I can log in as admin and I can create new users.
I then copied the site to localhost (C:Inetpubwwwroot), but when I run the site from localhost, I can't log in (as admin or any other user); instead I get a message that says, "Your login attempt was not successful. Please try again."
Also, I can't create a new user. When I try, I get the following error:
Server Error in '/' Application.


Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:



[SqlException (0x80131904): Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857242
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734854
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
I figure there must be a simple(?) explanation and solution for this problem, and ideally, some sort of step-by-step procedure that new users to ASP.NET can follow to configure a site - such as one of the starter kits - to work correctly. I can honestly say that trying to get this working has been an extremely frustrating experience.
If someone could help me out, I would really appreciate it. I've been working on this for two days and feeling I have hit the wall.
Thanks in advance.
 

View 1 Replies View Related

Failed To Update Database C:INETPUB... Because The Database Is Read-only.

Mar 28, 2006

Hi there,I am getting a real problem with ASP.NET 2.0, all i am trying to do is run a recovert password (using the login controls) and i got the following error.Does anybody know how to fix this? I have tried the SSEUTIL answer here and it didn't work. http://forums.asp.net/909168/ShowPost.aspxI also ensured that Network Services user has READ/WRITE/EXECUTE premissions on the directory below and that each file isn't read only and also that it inherits ACL from the directory which it seems to do..Bit of strange one this, it isn't created (and i am not using) a beta version of VS 2005 Pro... but a full retail version.The PC is the local PC with IIS 5.1 and VS installed... it is the one i am using for developing.. I don't need to copy my files to the IIS directory below as that is where i have created it and open it in VS 2005 from there..I did read that if you use IIS 5.1 then the user should be ASPNET ... but i don't seem to have that use but a Network Services user...Any help or guidance would be really appreciated... i have come to a stop stage and can't get any further..Thanksian
Server Error in '/igdotcom' Application.


Failed to update database
"C:INETPUBWWWROOTIGDOTCOMAPP_DATAASPNETDB.MDF" because the database
is read-only. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.SqlClient.SqlException: Failed to update database
"C:INETPUBWWWROOTIGDOTCOMAPP_DATAASPNETDB.MDF" because the database
is read-only.Source Error:



An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

View 3 Replies View Related

How To Update Data From This Database To Orther Database ?

Jun 20, 2007

 
Please help me How to update data from this Database to orther Database ?
Thank

View 5 Replies View Related

Failed To Update Database Because The Database Is Read-only

Mar 31, 2008

hi
i am currently testing my website on IIS7, and first error is that:
Server Error in '/' Application.


Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:INETPUBWWWROOTAPP_DATAASPNETDB.MDF" because the database is read-only.Source Error:



Line 109:
Line 110: conn.Open();
Line 111: SqlDataReader reader = command.ExecuteReader();
Line 112: reader.Close();
Line 113: command.Connection.Close();
i cheked on aspnet_Data folder to see if is read-only AND IT IS, but if i change it, the read-only property is setting up again. why?
thanks in advance

View 1 Replies View Related

Failed To Update Database Because The Database Is Read-only.

Dec 19, 2006

I am building a Windows Forms application in VS 2005, using C# and SQL Server 2005 Express as the backend.



When I try to accessd data from the db, it works with no problems.



When I try to insert/update/delete, I get the following error message



Failed to update database "DBNAME" because the database is read-only.



I am using a connection string with the following syntax:

"Data
Source=.SQLEXPRESS;AttachDbFilename=c:PATH_TO_DBdb.mdf;Database=MyDB;Integrated
Security=False;User Instance=False;User ID=USR;Password=PWD;"



I have made sure that the permissions on the DB are set (in Windows) so
that all users can modify. The user that is logging in to the DB has
status set to DBOWNER.



I have seen others experience the same problem - with ASP.net sites,
not Windows Forms sites (thus most of their solutions dont apply to me)



Any ideas on what is wrong and how I can get this to work?

View 9 Replies View Related

How Can I Update A SQL Database With An Access Database

Feb 14, 2008

I need to update an SQL database with an access database that is built on queries.  I need to do this nightly.
 
Can someone explain how to write the query for this and then I could add it to my nightly maintenance.
 
Thank you
Dee

View 10 Replies View Related

How Can I Update A SQL Database With An Access Database

Feb 14, 2008

I need to update an SQL database with an access database that is built on queries. I need to do this nightly.

Can someone explain how to write the query for this and then I could add it to my nightly maintenance.

Thank you
Dee

View 25 Replies View Related

How Can I Update A SQL Database With An Access Database

Feb 14, 2008


I need to update an SQL database with an access database that is built on queries. I need to do this nightly.

Can someone explain how to write the query for this and then I could add it to my nightly maintenance.

Thank you
Dee

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved