Error With Formatcurrency Statement
I got the following line in the formatcurrency statement that is giving error.
Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
FormatCurrency(TotPersonnel) & "</TD>" & vbCRLF
The error message is: Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'formatcurrency'
/gwisprod/FSR_EditDetailPrint.asp, line 345
I found out that if TotPersonnel field contains null value, the above error gets generated.
View Replies
ADVERTISEMENT
When inserting a value into a SQL Server DB of data type money, I have by value in the application formatted using FormatCurrency. When the value is passed into the stored procedure, do I need to strip off of the dollar sign ($), before passing in the value to the SP?If so, how would you strip off the dollar sign using the vbscript string methods?
View Replies
View Related
This is only part of my code. I want to add FormatCurrency() funtion before in/before the "salary" part. I should format plain number I request from my database (ex. 1000000) into $1,000,000. how to merge that two things together?
<%
do until rsEMP.EOF
response.write("<tr>")
response.write("<td>" &rsEMP("lastname")& "</td>")
response.write("<td>" &rsEMP("salary")& "</td>")
response.write("</tr>")
rsEMP.MoveNext
loop
rsEMP.close
%>
View Replies
View Related
I want to add FormatCurrency() funtion in/before the "salary" part. I should format plain number I request from my database (ex. 1000000) into $1,000,000. It would loop by itself.
Does anyone know how to merge that two things together?
<%
do until rsEMP.EOF
response.write("<tr>")
response.write("<td>" &rsEMP("lastname")& "</td>")
response.write("<td>" &rsEMP("salary")& "</td>")
response.write("</tr>")
rsEMP.MoveNext
loop
rsEMP.close
%>
View Replies
View Related
I've just finished a site for a client and am just sorting out some of the
finer elements of the site.
The client wants prices formatted like
£8
£11
rather than £8.00 or £11.00. If the price is £8.50 then it has to show
£8.50.
Could anyone advise on the syntax for formatting the price in this way? I
haven't got a reference book with this in, and haven't had much luck
searching the archive.
View Replies
View Related
formatcurrency function puts ( ) for negative numbers(e.g. (111) ). How can I display the negative numbers with a minus sign infront like -111.
View Replies
View Related
I'm having a very difficult time with an ASP page that I develpoped in Dreamweaver and the MS Access DB it's supposed to update. When I submit the data the following error appears:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/sessiondata2.asp, line 115
I know this is usually a reserved word issue but I don't think that's the case here because the page updates perfectly when executed on my computer as a testing server.
The rest of the site updates data into the database properly so I know the connection string is working. I can't figure out what would throw an error on a live server when there isn't one on a testing server. Code:
View Replies
View Related
I have this insert statement where instruction field in the DB is a memo field.
SQL="INSERT INTO int ([instruction]) VALUES " & _
"('"&Request.Form("myTextarea")&"')"
objConn.Execute(SQL)
Its giving me error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
View Replies
View Related
Im trying to use a sesson statement within an SQL Statement:
sql = "SELECT * FROM tblNumbers WHERE AllocatedTo=" & Session("Company") &
""
And get the error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/numberlist.asp, line 31
Anyone got any ideas? Surely this can only be something basic?
View Replies
View Related
I am trying to create a simple library system to document all our resources. Here is the
Code:
View Replies
View Related
Dim cc As Currency
Microsoft VBScript compilation error '800a0401'
Expected end of statement
process.asp, line 33
Dim cc As Currency
-------^
I am doing something wrong here. How should this be coded?
View Replies
View Related
I am trying to select all records from a table, however the table name I want to be a variable. I tried to do the following (code below), but it does not work. Any ideas on how to use a variable as part of a table name?
tableName = Request.Form("tableName")
tableName = REPLACE(tableName,"%20"," ")
set objConn=Server.CreateObject("ADODB.Connection")
objConn.Provider="Microsoft.Jet.OLEDB.4.0"
objConn.Open(Server.Mappath("db2/email.mdb"))
SET rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT * FROM" & tableName, objConn
View Replies
View Related
Find below the error I get when the code below is executed
Code:
splitval = split(request.form("start")," ")
dep = splitval(0)
splitval1 = split(request.form("end")," ")
dep1 = splitval1(0)
"SELECT * FROM Info WHERE requestDate BETWEEN dep AND dep1 "
error:
No value given for one or more required parameters.
Can someone help correct the error in the code.
View Replies
View Related
I am getting a syntax error on my SQL statement, not sure if I am doing this
right. i am trying to pass a value from another form.
strsql = "select PrinterModel, PrinterName, IP_Address, Location from
Printers where PrinterName = ' & <% =Request.Form(npName) %> & ')"
View Replies
View Related
I am trying to run a simple update statement through asp and for the life of me can't figure out why it isn't working. I was wondering if anyone could look at this and tell me what may be wrong: Code:
View Replies
View Related
I need the end statement to this sql query, but I am doing something wrong, is there site where they show you the different forms of ending sql statments in ASP? Code:
View Replies
View Related
when i execute any "Insert..." sql,i get this error message:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
can any one show me how to solve?
View Replies
View Related
i have this error on the regisration page of the website i'm doing.
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/Shop/register_process_corp.asp, line 40
SQL = "INSERT INTO
------------------^
Code:
View Replies
View Related
The block of code below shows how I am inserting field values into my dbase table:
strSQLStatement = "INSERT INTO tblArticles
(handid,ArticleDate,sport,articleheader, fpick,articleText) "_
& "SELECT '" & handid & "' As handid, '" _
& ArticleDate & "' As ArticleDate, '" _
& sport & " As sport, " _
& articleheader & "' As articleheader, '" _
& fpick & "' As fpick, '" _
& articleText & "' As articleText;"
Conn.Execute(strSQLStatement)
but I am getting an "Insert statement contains fewer items than the insert list" error , when in fact I am not (both 6 field names).
View Replies
View Related
i going to execute this sql statement...and the error come up.. why?
Select * From members Where ID = '123'
pls note that the type of ID is autonumber
is it becoz of type of ID is autonumber? how to solve this problem??
View Replies
View Related
Now I know I posted this elsewhere twice but no one seems to even be looking at them. I really am stumped by this problem.
I recieve the error:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/quizmaker/admin/create_teacher.asp, line 20
DIM mySQL
mySQL = "INSERT INTO users(user, password) VALUES('"& uname &"', "& pword &")"
USERS1.open mySQL , objConn <----- Line 20.
View Replies
View Related
Syntax error in INSERT INTO statement.
Please download the attachment and unzip it.
I have 4 files:
Starting with "signup.asp" - fill up the registration form. this will forward you to next form.
"signup_process.asp" - process the filled form
"signup_success.asp" - indicate that register successfully
"Database.mdb" - the database file (MS Access 2000 format)
My problem occurs in "signup_process.asp".
The error message found in IE:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/myweb/signup_process.asp, line 31
I look through my code, but found no mistake.
But why still I cannot add the information in the form into the "Database.mdb"?
View Replies
View Related
I want to capture the value of variable into a hidden input test field, using the following code.Code:
<input type="hidden" name="selectedby" size="20" value="<%'strNTUser'%>">
When i run the code the variable value is not captured in the field "selectedby". strNTUser is the variable.
View Replies
View Related
I've see this error message when I try to submit my form..
Help with Syntax error in INSERT INTO statement. line 153
Here's the SQL Code:
View Replies
View Related
I'm having trouble with an SQL UPDATE string updating Microsoft Access 2000 with jet engine using ASP classic. I can't see what could be going wrong, as far as I can tell it's fine. I have tried surrounding my field names with brackets [] to no avail.
The error I receive is: Code:
View Replies
View Related
during the creation of an HTML page using asp variable I have this
problem:
Microsoft VBScript compilation (0x800A0401) Expected end of statement
/asp/pages/connect1_1.asp, line 27, column 35
strtable = strtable & "<tr valign="top">" &
The code is the following: Code:
View Replies
View Related
i'm trying to update a row in my Access Database by the AD_ID... i get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
/alterantique1.asp, line 35
Here is the code:
View Replies
View Related
My Code is as follows, im basically trying to get the value from a radio button from another page for a vote, take the value thats allready in the table add 1 to the value and then insert it back into the database, then create a voted cookie and redirect back to the same page to view the vote results. Code:
View Replies
View Related
SQL = "UPDATE * FROM IME_request SET instructName = '" &InstructName& "', email = '" &email& "', school = '"&school&"', courseNumber='"&courseNumber&"', dateMonth = '"&dateMonth&"', dateYear = '"&dateYear&"', dateDay = '"&dateDay&"', description = '"&description&"', instructDesign = '"&instructDesign&"', techranger = '"& techranger & "', IP= '"&IP&"', completed = '"&completed&"', feedback = '"&feedback&"' WHERE courseNumber='" &courseNumber&"' "
I have a form that I want to update my database. I am receiving an error that reads:
Syntax error in UPDATE statement.
View Replies
View Related
I'm trying to update my counter in DB (Access) using sql query but the following error appears
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/cms/modules/test.asp, line 14
How could i solve this problem, here is sql query that i'm trying to run
sql = "UPDATE articles SET counter=counter+1 where (((aid) ="&aid&"))" .
View Replies
View Related
I keep getting the same error... Syntax error in INSERT INTO statement. (line 14) Code:
View Replies
View Related
I am making a masters page with delete, update , and insert fuctionality, i am using the insert.asp page with a form to submit the data and insert it in the database by prossesing a seperate page called insert_prosessor that has the Insert Statement to insert the data.
Now i am having trouble with the insert_prosessor as it's ERROR message reads" syntax error in INSERT Statement" I cant find the problem.. Code:
View Replies
View Related
What am I doing wrong with my Update statement in with
javascript? Code:
View Replies
View Related