hi all
i am doing database connection in ASP
my select statement is so long that it is running over 2 lines and im having error due to that, its been telling me incomplete string
i've used "_" to specify that the line is continuous bt ts is telling me invalid character
plzzz help
4 1569
Hi poopsy,
If you could show us your code in it's entirety, we'll try and help you with where it's going wrong. Normally to use the _ character you have to end the string and re-start it like so: -
mystring = "This is " _
-
"a string."
-
I've never had any problems with this method so if you could show us your code we may be able to help further.
Best regards,
medicineworker
Hi,
Your statement is
myString as String = "This is my long teststring which I want to break into two lines."
you can break it in 2 ways :
1) myString = "This is my long teststring which " & _
"I want to break into two lines."
2) OR even you can use the concatenation operator to give long strings.
myString = "This is my long teststring which "
myString = myString & "I want to break into two lines."
my code is - sInsert = "INSERT INTO Student (sfname, slname,saddress, home_no, semail ) values ('" & sfname & "','"& slname & "','" & saddress & "','" & shome &"','"& semail & "')"
hi there some thing that i noticed in ur query is like always be strict with the format and the spaces in ur query additional spaces in the query mostly a cauz of errors in the query here i have re-written ur query copy paste it and it will not give any error hope fully and that query of urs isnt that long i have been working with 13 fields table and have written the query in the same format it never gave any errors..now for ur query -
sInsert = "INSERT INTO Student(sfname, slname, saddress, home_no, semail ) values('"& sfname &"', '"& slname &"', '"& saddress &"', '"& shome &"', '"& semail &"')",YourconnetionString
-
my code is - sInsert = "INSERT INTO Student (sfname, slname,saddress, home_no, semail ) values ('" & sfname & "','"& slname & "','" & saddress & "','" & shome &"','"& semail & "')"
Sign in to post your reply or Sign up for a free account.
Similar topics
by: a-ok |
last post by:
Hi,
My client has a product database od around 20000 items. And it is
updated every few days when he gets a catalog from the supplier.
It's supposed to work like this: if there already is a...
|
by: Sans Spam |
last post by:
Greetings! I have a table that contains all of the function
permissions within a given application. These functions are different
sections of a site and each has its own permissions (READ, WRITE,...
|
by: Tim::.. |
last post by:
Can someone please tell me why I keep getting the following error from the
code below!
Error: INSERT statement conflicted with COLUMN FOREIGN KEY constraint...
|
by: Paul Mason |
last post by:
Hi folks,
The ado.net stream appears to be not working so I'm here.
The following function generates the error "Operation must use an updateable
query". There is no identifiable or meaningful...
|
by: Red |
last post by:
If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |