Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to write string query on multiple lines
#2
Try something like this!

[code2=vbnet]dbQuery = "INSERT INTO customer (accountNumber, nameLAST, nameFIRST, nameCOMPANY," & _
"addressSTREET, addressSTREET1, addressCITY, addressSTATE, addressZIPCODE, phone, fax, email)" & _
"VALUES('" & TextBoxAccount.Text & "','" & TextBoxLastName.Text & "','" & TextBoxFirstName.Text & _
"','" & TextBoxCompanyName.Text & "','" & TextBoxAddress1.Text & "','" & TextBoxAddress2.Text & "','" & _
TextBoxCity.Text & "','" & ComboBoxState.SelectedItem & "','" & MaskedTextBoxZip.Text & "','" & _
MaskedTextBoxPhone.Text & "','" & MaskedTextBoxFax.Text & "','" & TextBoxEmail.Text & "')"[/code2]

Basically, you just put a _ on the end of every line!
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Re: How to write string query on multiple lines - by brandonio21_phpbb3_import2 - 08-29-2012, 04:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  multiple csv files add sql server tables via VB.NET secilsengul 1 9,495 04-16-2014, 10:27 AM
Last Post: brco900033
  Problems with dividing a string brco900033 6 21,942 10-26-2013, 07:31 AM
Last Post: brco900033
  Convert 2 lines to one brco900033 2 11,091 02-23-2013, 11:04 AM
Last Post: brco900033
  [SOLVED] MySQL Update Query - What am I doing wrong? kismetgerald 11 40,047 10-18-2012, 07:16 PM
Last Post: brandonio21
  Read certain lines brco900033 3 13,823 09-26-2012, 03:56 PM
Last Post: brandonio21
  Read and delete lines brco900033 6 21,125 09-16-2012, 09:38 AM
Last Post: brandonio21
  Search ListBox + Convert ListBox.item to string brco900033 3 13,778 09-13-2012, 03:03 PM
Last Post: brandonio21
  VB.Net Query Builder Problems. Moldraxian 2 11,046 08-17-2012, 05:33 AM
Last Post: Moldraxian
  Outputting a string with quotation marks in it. openeXpressions 15 44,648 12-20-2011, 09:24 PM
Last Post: openeXpressions
  Problems with multiple textboxes and coding LearningVB2010 30 87,017 02-28-2011, 07:39 AM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)