Hi all,
I ahve the following SQL string but when i try to response.Write it there is
a error where the ',' should be between "city" and "County"
SQL = "INSERT * INTO customers (Company_Name, Category, Contact_Name,
Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1,
Phone_2, Fax, Web_URL, email_Address, Delivery, Notes)"
SQL = SQL & " VALUES('" & Request.Form("Company_Name") & "','" &
Request.Form("Category") & "','" * Request.Form("Contact_Name") & "','" &
Request.Form("Contact_Title") & "','" * Request.Form("Address_1") & "','" &
Request.Form("Address_2") & "','" & Request.Form("City") & "','" &
Request.Form("County") & "','" & Request.Form("Post_Code") & "','" &
Request.Form("Phone_2") & "','" & Request.Form("Fax") & "','" &
Request.Form("Web_Url") & "','" & Request.Form("email_address") & "','" &
Request.Form("Delivery") & "','" & Request.Form("Notes") & "')"
OUTPUT
INSERT * INTO customers (Company_Name, Category, Contact_Name,
Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1,
Phone_2, Fax, Web_URL, email_Address, Delivery, Notes)
VALUES('','1','','','','address_2','1, 1','','','','','','','','')
The text in questiuon is '1,1' When it should be '1','1' The SQL code should
output that syntax but it isnt? Any ideas why? 5 2077
Do a Response.Write on JUST the two vaules in question once.
--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"Mike M" <mi**@mack1.karoo.co.uk> wrote in message
news:bh**********@newsreaderm1.core.theplanet.net. .. Hi all, I ahve the following SQL string but when i try to response.Write it there
is a error where the ',' should be between "city" and "County" SQL = "INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes)" SQL = SQL & " VALUES('" & Request.Form("Company_Name") & "','" & Request.Form("Category") & "','" * Request.Form("Contact_Name") & "','" & Request.Form("Contact_Title") & "','" * Request.Form("Address_1") & "','"
& Request.Form("Address_2") & "','" & Request.Form("City") & "','" & Request.Form("County") & "','" & Request.Form("Post_Code") & "','" & Request.Form("Phone_2") & "','" & Request.Form("Fax") & "','" & Request.Form("Web_Url") & "','" & Request.Form("email_address") & "','" & Request.Form("Delivery") & "','" & Request.Form("Notes") & "')"
OUTPUT
INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes) VALUES('','1','','','','address_2','1, 1','','','','','','','','')
The text in questiuon is '1,1' When it should be '1','1' The SQL code
should output that syntax but it isnt? Any ideas why?
Whats the " * Request.Form" all about?
I think youll find its because of that typo.
The & is next door ;-)
"Mike M" <mi**@mack1.karoo.co.uk> wrote in message
news:bh**********@newsreaderm1.core.theplanet.net. .. Hi all, I ahve the following SQL string but when i try to response.Write it there
is a error where the ',' should be between "city" and "County" SQL = "INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes)" SQL = SQL & " VALUES('" & Request.Form("Company_Name") & "','" & Request.Form("Category") & "','" * Request.Form("Contact_Name") & "','" & Request.Form("Contact_Title") & "','" * Request.Form("Address_1") & "','"
& Request.Form("Address_2") & "','" & Request.Form("City") & "','" & Request.Form("County") & "','" & Request.Form("Post_Code") & "','" & Request.Form("Phone_2") & "','" & Request.Form("Fax") & "','" & Request.Form("Web_Url") & "','" & Request.Form("email_address") & "','" & Request.Form("Delivery") & "','" & Request.Form("Notes") & "')"
OUTPUT
INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes) VALUES('','1','','','','address_2','1, 1','','','','','','','','')
The text in questiuon is '1,1' When it should be '1','1' The SQL code
should output that syntax but it isnt? Any ideas why?
"Mike M" <mi**@mack1.karoo.co.uk> wrote in message
news:bh**********@newsreaderm1.core.theplanet.net. .. Hi all, I ahve the following SQL string but when i try to response.Write it there
is a error where the ',' should be between "city" and "County" SQL = "INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes)" SQL = SQL & " VALUES('" & Request.Form("Company_Name") & "','" & Request.Form("Category") & "','" * Request.Form("Contact_Name") & "','" & Request.Form("Contact_Title") & "','" * Request.Form("Address_1") & "','"
& Request.Form("Address_2") & "','" & Request.Form("City") & "','" & Request.Form("County") & "','" & Request.Form("Post_Code") & "','" & Request.Form("Phone_2") & "','" & Request.Form("Fax") & "','" & Request.Form("Web_Url") & "','" & Request.Form("email_address") & "','" & Request.Form("Delivery") & "','" & Request.Form("Notes") & "')"
OUTPUT
INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes) VALUES('','1','','','','address_2','1, 1','','','','','','','','')
The text in questiuon is '1,1' When it should be '1','1' The SQL code
should output that syntax but it isnt? Any ideas why? thanks all, got it sorted
THE CORRECT SYNTAX IS
INSERT INTO [TABLE] (STRINGFIELD,INTEGERFIELD,BOOLEANFIELD) VALUES ('MY
STRING',1,TRUE);
AS YOU CAN SEE THERE IS ONE VALID VALUE FOR EVERY FIELD:
STRINGFIELD='MY STRING'
INTEGERFIELD=1
BOOLEANFIELD=TRUE
TRY MACH YOUR VALUES OK?
AND BECAREFUL WITH * AND & WHEN YOU TRY TO JOIN YOUR QRY This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chris Geerdink |
last post by:
combo with PHP. what is wrong with the Javascript?
else
{
include("mysql.php");
$query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES
('".$_POST."', '".$_POST."',...
|
by: Tony |
last post by:
I found similar code for encoding/decoding strings in VB which works fine.
However I wanted to use it in a C# projected and can't get it to work.
When it executes the TransformFinalBlock() call at...
|
by: aa |
last post by:
When I am reading from local disk (d:), everithing is OK, but then I am
reading from map disk I am geting the this error. Whats wrong. Thanks
Server Error in '/Extra' Application....
|
by: mahsa |
last post by:
Hi do you know whats wrong with this code?
<asp:HyperLink id="HLink_Help" runat="server" NavigateUrl='<%# "javascript:window.open('comments.aspx?id=1,width=500,height=600, scrollBars=yes');"...
|
by: Vaidas Gudas |
last post by:
I has web project on virtual pc, maked with framework 2.0. there I was used
the method role.roleexists("admin") and everything was worked good.
but when i replace this project on my local machine,...
|
by: blah |
last post by:
Hello everyone, Ive been trying to get my application to "click" on a
button in another application using SendMessage, Ive gotten this far
but Im not sure whats wrong with this code, here is the...
|
by: Mike Barnard |
last post by:
It's a simple test... VERY SIMPLE. But...
In an external stlyesheet some attributes don't show. With the same
styles cut and pasted to the test internally it works as expected.
Anyone tell...
|
by: LoneHunter01 |
last post by:
Basically, I just need a general direction on where to go for this. Yes, this is for a school project, though it's strictly an optional one (and I have tried many solutions, one in-depth). We've...
|
by: joestevens232 |
last post by:
Ok everything is good...I read in all my grades into each of the different arrays that they need to go in. Now Im trying to write a function that takes the grades and computes the average on a...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |