Just Need Some Basic Functionality Like Update,delete, Insert, Simple Constraints And Relations?
Feb 17, 2010
Is there some kind of simple database system that uses simple text or xml files for data storage? I just need some basic functionality like update,delete, insert, simple constraints and relations.For the project that I have now using SQL Server would be too heavyweight and I have never really liked it anyway.
Unable to add update and delete functionality to any data control using MS Visual Web developer Express and SQL server 2008. The advanced options in the data connection wizard remain disabled. I can display data OK.
I am however able to connect to an Access 2007 DB through the same page and get this functionality to work.
i have a problem executing an insert query. whenever i try to insert i have an exeption telling me it cant execute because a record needed in another table; where i select a value form that other table according a listbox, and then insert it into this table. here is a sample of my code:
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|emp2.mdb");
int a = 0; conn.Open(); string sqlcmd = "select id from nationality where descreption = '" + DropDownList1.Text + "'"; OleDbCommand readNatCmd = new OleDbCommand(sqlcmd, conn); OleDbDataReader readerNat = readNatCmd.ExecuteReader(); while (readerNat.Read()) { a = readerNat.GetInt32(0); } readerNat.Close(); conn.Close(); string saveEmpcmd = @"insert into employee " + "(nationality) " + "values (@nationality)"; OleDbCommand objCmd = new OleDbCommand(saveEmpcmd, conn); objCmd.Parameters.AddWithValue("@nationality", a); conn.Open(); objCmd.ExecuteNonQuery(); conn.Close();
now, the form executes with no errors, but it catches an exeption caused by the ExecuteNonQuery funtion; here it is in details:
System.Data.OleDb.OleDbException: You cannot add or change a record because a related record is required in table 'nationality'. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Default2.Button1_Click(Object sender, EventArgs e) in c:Documents and SettingsAdministratorMy DocumentsVisual Studio 2005WebSitesempDefault2.aspx.cs:line 305
when i remove the relation between the tables, the exeption isnt catched anymore, but the value stored in the employee table is 0 how can i solve this?
I'm kind of new to ajax. I normally just use the canlendar and some popup stuffs.i'm wondering what is the practice to doing Insert, Update, and Delete on GridView/FormView with ajax.s UpdatePanel the best thing i can use it with Insert, Update, and Delete?
We are working in asp.net mvc in one of our project. This is first time we work on mvc. Previous we worked on Forms based development. In MVC we are facing some problem. Form based development there are so many control but in mvc there are no control. can anyone give us link of some control like gridview with insert update delete and some other tools that I can easily use in my project. We are using asp.net mvc 2.0.
I am using a LinqDataSource fed by a stored procedure in my data context for the data source of my grid view in an update panel. The issue I have is that after I get the grid row into edit mode, I can't get it to commit an update. I figure my issue here stems from TableName and EntityTypeName, but am unsure what to do with them. This MSDN page has the following line in the 'Working with Stored Procedures' section: 'If you want to enable automatic update, insert, and delete operations for the data, the type that is returned from the method must match the type that is specified in the TableName property.'
The return type of my stored procedure is 'loadHaveToOfferByUserIDResult' but when I use that for the TableName, I get the following error: Could not find a property or field called 'loadHaveToOfferByUserIDResult' on the data context type 'LINQClassDataContext' of LinqDataSource 'haveToOfferLinqDataSource'.
I just want to be able to create a site that will allow users to insert/update/delete information from the site and the information will be recorded on the SQL DB.
Went through couple of Videos and Tutorials, it can't be that complicated?
I have googled this a little and didn't really find the answer I needed. I am working on a webpage in C# with SQL Server and LINQ for a customer.I want the users to be able to send messages to each other. So what I do is that I unit test this with data that actually goes into the database.The problem is that I now depend on having at least 2 users who I know the ID of. Furthermore I have to clean up after my self. This leads to rather large unit tests that test alot in one test. Lets say I would like to update a user. That would mean that I would have to ceate the user, update it, and then delete it. This a lot of assertions in one unit test and if it fails with updating i have to manually delete it. If I would do it any other way, without saving the data to DB, I would not for sure be able to know that the data was present in the database after updating etc.What is the proper way to do this without having a test that tests a lot of functionality in one test?
I am building a web site, it's used to manage the data in SQL server so the another web site(connect to the same SQL database) can receive the new infoSo far I've build 2 parts, one manages the news system, the another manages the album system, news manage system work perfect, when I update, add or delete news form the web site (using sqldatasource, INSERT, DELETE and UPDATE command), the data inside SQL changes as well.
I just drag a listview to my web page. When I config the data source, click the advanced button.I found that the item "Generate INSERT, UPDATE, and DELETE statements blah blah" is grayed out. Therefore I can'tmodify the records at runtime.I am using VWD 2008 Express,
i have made a connection and retrieve the data from the excel sheet. however when i run a query to update or insert some data into excel sheet it will generate an error "Cannot expand named range"
I want to apply INSERT < UPDATE < DELETE < SEARCH (you can apply searching outside gridview if u wish) in gridview by using XML File Provided above as a data source ...
For your ease here's a link : INSERT UPDATE DELETE IN GRIDVIEW USING XML
I have two databases. When I am using MS Visual Web Developer, I can drag the table onto the webpage and it gives me check boxes to Insert, Update, Delete,...When I do the exact thing using the other database, it only has check boxes forpaging, sorting and selection. What is the difference? I seem to have all teh same permissions in both databases.
I have a page that is using the value from a textbox on a previous page to populate a formview. When I generate the Insert, Update and Delete Statements in Web Developer the edit brings up a blank page and the insert and delete don't work. It works if I just create the formview on a page and hardcode the value in the select statement then the Edit/Delete and Insert works.
Before I get too far down the road I just want some advice. I'm building a web app using VWD2008 and MySQL 5. I've got the membership provider stuff working fine and have an odbc connection setup which works "fine". what I've noticed is that when I configure a new sqldatasource (that will be used to provide data to a listview or something) the Advanced -> generate Insert,Update..... option is disabled. I'm assuming its because of the sql syntax difference of the square brackets issue between MS SQL Server and MySQL.
Before I start writing all my own insert and update statements does anyone know if there is a way to get MySQL and VWD to talk the same language, maybe a different connector or something. I'm using mysql-connector-odbc-3.51.15