views:

448

answers:

3

Hello, I'm using Visual Studio 2008 and an Access 2007 database. While I'm trying to create a new insert query in my DataSet, the insert stored procedure mixes up the database field values. I have a print screen of the problem here: http://netplague.eu/Capture.PNG As you can see in the attached print screen the table clients is displayed and below the InsertClient stored procedure. My problem is that the parameters are all mixed up.

Is there a solution to this problem or is it just a visual studio bug?

Thank you.

A: 

It's probably just a display order issue.

If you are inserting the parameters in alphabetical order of the field names, but Visual Studio is displaying the fields in the order they are defined in the database (for example), this would explain the difference.

Robert Harvey
It is a problem of display order and I need to resolve it somehow. I have an access database and I can't insert new records in it because of this. I will give you an other example. For instance I have a table with a client's data like this:Client Table:First_name - type varchar;Last_name -type varchar;last_log_date - type dateTime;smoker -type boolean;Okay, when I add the Insert query to it from the DataSet it generates something like this:InsertQuery(smoker, param1,param2,param3);When I try to use this I get a bunch of errors while runtime. How could this be?
Artanis
Is this the old problem with needing to have the parameters passed in the same order as they are defined (i.e., no named parameters)?
David-W-Fenton
Yes they have to be passed in the same order as they are in the database.
Artanis
A: 

Hello.My name is abbas.I am iranian.I am student Software computer.I write program Whit languege C#.NET.How to connect to SQL Sever 2005 White C#.NET?tank you

abs
A: 

Hi Artanis, I had your same problem. I have fixed it installing the service pack 1 for Microsoft visual studio 2008. I hope this help.

Simone

simone