TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Le Coder
NA
10
0
odbc problem
Jan 30 2008 5:22 PM
dtc[0].Rows[0]["admin_first_name"] = "Amadeo";
string updstr = @"UPDATE admins SET admin_first_name=@admin_first_name " +
"WHERE admins.id_admin=@id_admin";
OdbcCommand com = new OdbcCommand(updstr, odbcConn);
com.Parameters.Add("@admin_first_name", OdbcType.NText,50,"admin_first_name");
// i tried by odbcType with : Text,VarChar ,NChar
dbcParameter param= com.Parameters.Add("@id_admin",OdbcType.Int,4,"id_admin");
// and here by odbcType with BigInt, Numeric
param.SourceVersion = DataRowVersion.Original;
odbcDA.UpdateCommand = com;
odbcDA.Update(ds,"admins");
The Error is : Too Few parameters .Expected 2
i think i dont match something at the parameters
The size of the fields must be exactly as long as the one from the Database?
i have put 50 for the Text ( admin_first_name ) in my Database
and long integer for id_admin
Reply
Answers (
1
)
C#.NET WCF Developer needed for Contract in London
C# URGENT Please Help! Crystal Report Viewer & Reports Help