Click here to Skip to main content
15,914,014 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to record the video from a System.Windows.Forms.Panel? Pin
NotPolitcallyCorrect13-Mar-13 1:43
NotPolitcallyCorrect13-Mar-13 1:43 
AnswerRe: How to record the video from a System.Windows.Forms.Panel? Pin
makhondi13-Mar-13 1:50
makhondi13-Mar-13 1:50 
GeneralRe: How to record the video from a System.Windows.Forms.Panel? Pin
NotPolitcallyCorrect13-Mar-13 2:36
NotPolitcallyCorrect13-Mar-13 2:36 
AnswerRe: How to record the video from a System.Windows.Forms.Panel? Pin
Pete O'Hanlon13-Mar-13 2:08
mvePete O'Hanlon13-Mar-13 2:08 
AnswerRe: How to record the video from a System.Windows.Forms.Panel? Pin
Dave Kreskowiak13-Mar-13 6:47
mveDave Kreskowiak13-Mar-13 6:47 
QuestionHelp! Create File Pin
makhondi13-Mar-13 0:59
makhondi13-Mar-13 0:59 
AnswerRe: Help! Create File Pin
Garth J Lancaster13-Mar-13 1:12
professionalGarth J Lancaster13-Mar-13 1:12 
AnswerRe: Help! Create File Pin
Pete O'Hanlon13-Mar-13 1:13
mvePete O'Hanlon13-Mar-13 1:13 
AnswerRe: Help! Create File Pin
Garth J Lancaster13-Mar-13 1:13
professionalGarth J Lancaster13-Mar-13 1:13 
GeneralRe: Help! Create File Pin
GuyThiebaut13-Mar-13 1:48
professionalGuyThiebaut13-Mar-13 1:48 
QuestionMultiple Serial Ports over TCPIP Pin
ritmas12-Mar-13 23:27
ritmas12-Mar-13 23:27 
QuestionRegarding K-means Text Clustering Pin
sunny funny12-Mar-13 21:44
sunny funny12-Mar-13 21:44 
AnswerRe: Regarding K-means Text Clustering Pin
Pete O'Hanlon12-Mar-13 21:51
mvePete O'Hanlon12-Mar-13 21:51 
QuestionTask ContinueWith Pin
MAW3012-Mar-13 16:20
MAW3012-Mar-13 16:20 
AnswerRe: Task ContinueWith Pin
Simon_Whale13-Mar-13 0:11
Simon_Whale13-Mar-13 0:11 
QuestionRetreiving a list of network computer Pin
R4yth3ron12-Mar-13 6:55
R4yth3ron12-Mar-13 6:55 
AnswerRe: Retreiving a list of network computer Pin
Ingo12-Mar-13 7:08
Ingo12-Mar-13 7:08 
GeneralRe: Retreiving a list of network computer Pin
R4yth3ron12-Mar-13 7:18
R4yth3ron12-Mar-13 7:18 
AnswerRe: Retreiving a list of network computer Pin
Ingo17-Mar-13 22:56
Ingo17-Mar-13 22:56 
AnswerRe: Retreiving a list of network computer Pin
OriginalGriff12-Mar-13 21:08
mveOriginalGriff12-Mar-13 21:08 
QuestionError C# : Conversion failed when converting the nvarchar value 'd' to data type int. Pin
Hodamdi11-Mar-13 22:31
Hodamdi11-Mar-13 22:31 
Hi I want to insert data from some text box to table of sqldatabase but some field is int and some one is nvarchar how to convert text of text box to them i do below code but i have

constr = "Data Source=SAFA4-PC;Initial Catalog=StudentDb;Integrated Security=True";
System.Data.SqlClient.SqlConnection Conn = new System.Data.SqlClient.SqlConnection();
Conn.ConnectionString = constr;
Conn.Open();
System.Data.SqlClient.SqlCommand Comm = new System.Data.SqlClient.SqlCommand();
Comm.CommandText = "insert into Tbl_Student (Code ,Name ,LastName ,CityCode ,Address ,BirthDay ,FatherName ,ID,CodeMeli,tel ) values( @Code,@Name,@LastName,@FatherName,@Id,@MeliCode,@Tel,@Address,@BirthDay,@CityCombo)";
Comm.CommandType = System.Data.CommandType.Text;
Comm.Connection = Conn;
Comm.Parameters.Add("@Code", SqlDbType.Int);//, int.Parse(StudentCode.Text));
Comm.Parameters["@Code"].Value = int.Parse(StudentCode.Text);
Comm.Parameters.Add("@Name", SqlDbType.NVarChar);//Name.Text);
Comm.Parameters["@Name"].Value = Name.Text;
Comm.Parameters.Add("@LastName", SqlDbType.NVarChar);// LastName.Text);
Comm.Parameters["@LastName"].Value = LastName.Text;
Comm.Parameters.Add("@FatherName", SqlDbType.NVarChar);// FatherName.Text);
Comm.Parameters["@FatherName"].Value =FatherName.Text;
Comm.Parameters.Add("@Id", SqlDbType.Int); //int.Parse(Id.Text));
Comm.Parameters["@Id"].Value = int.Parse(Id.Text);
Comm.Parameters.Add("@MeliCode",SqlDbType.Int);
Comm.Parameters["@MeliCode"].Value = int.Parse(MeliCode.Text);
Comm.Parameters.Add("@Tel",SqlDbType.Int);
Comm.Parameters["@Tel"].Value = int.Parse(Tel.Text);
Comm.Parameters.Add("@Address",SqlDbType.NVarChar);
Comm.Parameters["@Address"].Value = Address.Text;
Comm.Parameters.Add("@BirthDay", SqlDbType.Char);// BirthDay.Text);
Comm.Parameters["@BirthDay"].Value = BirthDay.Text.ToString();
Comm.Parameters.AddWithValue("@CityCombo", CityCombo.ValueMember);
Comm.ExecuteNonQuery();
Conn.Close();

this error :
Conversion failed when converting the nvarchar value 'd' to data type int.

Please help me
AnswerRe: Error C# : Conversion failed when converting the nvarchar value 'd' to data type int. Pin
Karthik Harve11-Mar-13 22:48
professionalKarthik Harve11-Mar-13 22:48 
AnswerRe: Error C# : Conversion failed when converting the nvarchar value 'd' to data type int. Pin
Abhinav S12-Mar-13 2:31
Abhinav S12-Mar-13 2:31 
AnswerRe: Error C# : Conversion failed when converting the nvarchar value 'd' to data type int. Pin
Bernhard Hiller12-Mar-13 4:55
Bernhard Hiller12-Mar-13 4:55 
QuestionHOW I PROVIDE SECURITY OF MY DLL FILE FROM END USER Pin
seema jadhav11-Mar-13 21:09
seema jadhav11-Mar-13 21:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.