insertcommand

SqlDataAdapter Insert with Multiple Tables

I have a static class which loads the initial data for my c# windows forms application. The data is retrieved via 1 sqldataadapter with one query selecting from multiple sql server tables. These are then used to populate multiple datatables like so and filled into my dataset da.TableMappings.Add("Table", "ChannelTypes"); da.TableMapping...

asp.net InsertCommand to return latest insert ID

Dear all, I'm unable to retrieve the latest inserted id from my SQL Server 2000 db using a typed dataset in asp.NET I have created a tableadapter and I ticked the "Refresh datatable" and "Generate Insert, Update and Delete statements". This auto-generates the Fill and GetData methods, and the Insert, Update, Select and Delete statement...

ASP.NET Error The conversion of a nvarchar data type to a smalldatetime data type resulted in an out-of-range value.

Hey all I'm trying to do the following insert query SqlDataSource userQuizDataSource = new SqlDataSource(); userQuizDataSource.ConnectionString = "Data Source=localhost\\SQLEXPRESS;Initial Catalog=quizApp;Integrated Security=True"; userQuizDataSource.InsertCommand = "INSERT INTO [UserQuiz] ([DateTimeComplete], [Score], [UserName]) VALUE...