C# to Vb.net Convert error in string place...,
-
Hi i convert some c# code to vb.net format, But i am getting error in one place..., Plz see this code: This is C# code: String addData = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" + Guid.NewGuid() + "','" + new Guid(e.CommandArgument.ToString()) + "','" + txtAddShipName.Text.Trim() + "','" + txtAddShipCity.Text.Trim() + "')"; After convert to Vb.net format: Dim addData As String = ("INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" _ + (Guid.NewGuid) + "','" _ + (New Guid(e.CommandArgument.ToString)) + "','" _ + (txtAddShipName.Text.Trim) + "','" _ + (txtAddShipCity.Text.Trim) + "')") Whats the probs in thsi code?, I have mentioned wher i get probs that is in bold letters...,
Regards, Magi
-
Hi i convert some c# code to vb.net format, But i am getting error in one place..., Plz see this code: This is C# code: String addData = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" + Guid.NewGuid() + "','" + new Guid(e.CommandArgument.ToString()) + "','" + txtAddShipName.Text.Trim() + "','" + txtAddShipCity.Text.Trim() + "')"; After convert to Vb.net format: Dim addData As String = ("INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" _ + (Guid.NewGuid) + "','" _ + (New Guid(e.CommandArgument.ToString)) + "','" _ + (txtAddShipName.Text.Trim) + "','" _ + (txtAddShipCity.Text.Trim) + "')") Whats the probs in thsi code?, I have mentioned wher i get probs that is in bold letters...,
Regards, Magi
try this: Dim addData As String = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES " & _ "('" & (Guid.NewGuid) & "'," & _ " '"& (New Guid(e.CommandArgument.ToString)) & "'," & _ " '" & (txtAddShipName.Text.Trim) & "', " & _ " '" & (txtAddShipCity.Text.Trim) & "')"
-
try this: Dim addData As String = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES " & _ "('" & (Guid.NewGuid) & "'," & _ " '"& (New Guid(e.CommandArgument.ToString)) & "'," & _ " '" & (txtAddShipName.Text.Trim) & "', " & _ " '" & (txtAddShipCity.Text.Trim) & "')"
No its giving same place error...,
Regards, Magi
-
No its giving same place error...,
Regards, Magi
hey, try it,
Private addData As String = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" + Guid.NewGuid
regards, koolprasad2003If the message is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy
-
Hi i convert some c# code to vb.net format, But i am getting error in one place..., Plz see this code: This is C# code: String addData = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" + Guid.NewGuid() + "','" + new Guid(e.CommandArgument.ToString()) + "','" + txtAddShipName.Text.Trim() + "','" + txtAddShipCity.Text.Trim() + "')"; After convert to Vb.net format: Dim addData As String = ("INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" _ + (Guid.NewGuid) + "','" _ + (New Guid(e.CommandArgument.ToString)) + "','" _ + (txtAddShipName.Text.Trim) + "','" _ + (txtAddShipCity.Text.Trim) + "')") Whats the probs in thsi code?, I have mentioned wher i get probs that is in bold letters...,
Regards, Magi
The Converter gives me this ~
Dim addData As String = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" & Guid.NewGuid() & "','" & New Guid(e.CommandArgument.ToString()) & "','" * txtAddShipName.Text.Trim() & "','" & txtAddShipCity.Text.Trim() & "')"
What error you are getting? at runtime or design time? Show us the error message.Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)
-
Hi i convert some c# code to vb.net format, But i am getting error in one place..., Plz see this code: This is C# code: String addData = "INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" + Guid.NewGuid() + "','" + new Guid(e.CommandArgument.ToString()) + "','" + txtAddShipName.Text.Trim() + "','" + txtAddShipCity.Text.Trim() + "')"; After convert to Vb.net format: Dim addData As String = ("INSERT INTO Ords (OrderId, CustomerId, ShipName, ShipCity) VALUES ('" _ + (Guid.NewGuid) + "','" _ + (New Guid(e.CommandArgument.ToString)) + "','" _ + (txtAddShipName.Text.Trim) + "','" _ + (txtAddShipCity.Text.Trim) + "')") Whats the probs in thsi code?, I have mentioned wher i get probs that is in bold letters...,
Regards, Magi
there's a ( before the "