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?
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 %>
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 %>
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.
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:
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.
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?
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
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:
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:
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"?
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.
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">" &
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:
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: