S
Sebastian W.
Hello.
I am a beginner concerning ADO.net. I want to access a Microsoft
Access file (mdb). Opening the database, selecting rows and reading
then from the table-object into my program is no problem. I use a SQL
expression to load them (SELECT * FROM table WHERE ….).
But I do not know how to insert new data into the tables or how to
update a row.
I first tried to generate a SQL command (INSERT INTO table1(...) SET
column='Value') but the data I need to handle is a multiline text (CR,
LF) and may contain the inverted comma ( ' ) as well... so the SQL-cmd
does not work...
So I tried to use the Dataset and a CommandBuilder, as long as I do
not know how the UpdateCommand and the InsertCommand have to look like
(How knows ADO in which section of the SQL Command it should insert
the data). But it did not work
(Error: "An unhandled exception of type
'System.Data.OleDb.OleDbException' occurred in
microsoft.visualbasic.dll" at Dataset.Update)
To cut a long story short: How do I update/insert multiline-texts in
my MDB?
Thanks
Sebastian Walters
(e-mail address removed)
I am a beginner concerning ADO.net. I want to access a Microsoft
Access file (mdb). Opening the database, selecting rows and reading
then from the table-object into my program is no problem. I use a SQL
expression to load them (SELECT * FROM table WHERE ….).
But I do not know how to insert new data into the tables or how to
update a row.
I first tried to generate a SQL command (INSERT INTO table1(...) SET
column='Value') but the data I need to handle is a multiline text (CR,
LF) and may contain the inverted comma ( ' ) as well... so the SQL-cmd
does not work...
So I tried to use the Dataset and a CommandBuilder, as long as I do
not know how the UpdateCommand and the InsertCommand have to look like
(How knows ADO in which section of the SQL Command it should insert
the data). But it did not work
(Error: "An unhandled exception of type
'System.Data.OleDb.OleDbException' occurred in
microsoft.visualbasic.dll" at Dataset.Update)
To cut a long story short: How do I update/insert multiline-texts in
my MDB?
Thanks
Sebastian Walters
(e-mail address removed)