Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
when i insert data into sqlserver i check in stringsql yet that return '' < == empty value but y it insert it return 1/1/1900 :confused: how to slove this ??
  • *Experts*
Posted
I agree with Wyrds implied point about your question being hard to decipher. That being said, I assume your variable is a Date type. If you do not assign an initial value to a variable, Visual Basic .Net will initialize your varialbles for you during compilation based on the variables type.
Posted

PlausiblyDamp : no defaul specified

jfackler : here is my code in field first, filingDate, Issue, mailed and publish is DateTime Format

 

string strsql3 = "INSERT INTO tblTrademark(AppNo,RegNo,"
				+"StatusName,TypeName,NewOrCon,Your,"
				+"CountryName,AgentName,TrademarkName,TrademarkColor,"
				+"Notes,FirstContact,FilingDate,Issued,Mailed,"
				+"Publish,Related,Priority,Correspondens,AgentRef,ApplicantRef,"
				+"OwnerRef,Entered,Modified,UserName) "
				+"VALUES(N'" + txtAppNo.Text
				+ "',N'" + txtRegNo.Text
				+ "',N'" + ddlStatus.SelectedItem.Value 
				+ "',N'" + ddlType.SelectedItem.Value 
				+ "',N'" + ddlNew.SelectedItem.Value 
				+ "',N'" + txtYour.Text 
				+ "',N'" + ddlCountry.SelectedItem.Value 
				+ "',N'" + ddlAgent.SelectedItem.Value 
				+ "',N'" + txtTrademark.Text 
				+ "',N'" + ddlColor.SelectedItem.Value
				+ "',N'" + txtNotes.Text 
				+ "','" + txtFirst.Text 
				+ "','" + txtFiling.Text 
				+ "','" + txtIssued.Text 
				+ "','" + txtMail.Text 
				+ "','" + txtPublish.Text 
				+ "',N'" + txtRelated.Text 
				+ "',N'" + txtPriority.Text 
				+ "',N'" + txtCorespondens.Text 
				+ "',N'" + txtAgentRef.Text 
				+ "',N'" + txtAppRef.Text 
				+ "',N'" + txtOwnerRef.Text 
				+ "',N'" + DateTime.Now
				+ "',N'" + DateTime.Now
				+ "',N'" + Session["User"] + "')";

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...