<UseAdddressAtEndofMess...@swspectrum.com> wrote:
> On 30 May 2007 09:59:17 -0700, Marc <marc.birk...@gmail.com> wrote:
>
> =A4 Hi to the group.
> =A4
> =A4 I am at my wits end with this problem. I am working in Visual Web
> =A4 Developer 2005, .NET 2, C#, MS-Access.
> =A4
> =A4 I have created a dataset (xsd) with some datatables in for interacting
> =A4 with my database tables. I am attempting to create a new insert query
> =A4 in a table adapter which will return the @@identity value of the newly
> =A4 inserted column. Everything i have read while researching this problem
> =A4 states to create a new query on the table adaper containing two sql
> =A4 statements i.e:
> =A4
> =A4 INSERT INTO myTable VALUE (?,?,?,?);
> =A4 SELECT @@Identity;
> =A4
> =A4 however, when i do this the required parameters arent automatically
> =A4 added to the query method, and then when i enter them manually and run
> =A4 it i get an OleDbException error of:
> =A4
> =A4 "System.Data.OleDb.OleDbException : Characters found after end of SQL
> =A4 statement."
> =A4
> =A4 Am quickly coming to the conclusion that the only way to get round
> =A4 this is to create my own data access classes as i would with .net 1.1.
> =A4 Can anyone help me?
>
> Jet doesn't support multi-statement batch commands.
>
> There is an MS KB article that covers this topic but it may not help you =
if this is an ASP.NET app.
>
>
http://support.microsoft.com/kb/815629 >
> You may want to consider creating your own method for generating a unique=
identity value.
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
Many thanks for this suggestions. Eventually i came up with my own
the same db.