INSERT/UPDATE Error In ASP

I try to do an INSERT statement throught my ASP to add records to my Access DB. However I get an error when I execute this. The code in ASP is -

strSQL = "INSERT INTO tbl_psm (LocID, Week, Month, Year, Rating, Remark, Action, SubmittedDateTime) VALUES ('" &cint(intLocid)& "', '" &cint(sWeek)& "', '" &cint(sMonth)& "', '" &cint(sYear)& "', '" &cint(sRating)& "', '" &sRemark& "', '" &sAction& "', '" &formatdatetime(date,vbshortdate)& "');"

objConn.Execute strSQL

I get the error page Code:

View Replies


ADVERTISEMENT

Insert And Update Error

I am submitting a comment box from a form into a database field that I have declared as text (16). When I type in a small amount of information, it submits just fine, but when I enter a substantial amount of data then I receive an error. I've tried different field types, but I keep getting the same error.

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 's'.

View Replies View Related

Insert And Update In Asp

this programe is read date for excel and export to mdb,if there exist the BID in mdb then update the date,else inert the date to mdb. Code:

View Replies View Related

INSERT/UPDATE

I have a form that pulls existing information from a database and allows users to edit it. Every field can be left blank if the user wishes.

I am having an issue with determining which SQL statement to run. There has to be an easier way to do this then what I am doing. For each filed I process the data this way:

SQL2="select * from 1985ClassList where MailingListID =" & Session("EID")
set aData = oConn.execute(SQL2)

Code:

View Replies View Related

Asp Sql - Check If Update Else Insert..

I'm using a database to store the products in a basket.

It's this scenario:
A visitor already has some products in his basket and wants add some new ones.

Now, first I want to check if the selected products aren't already in the database.

1. if they are -> update the product when the amount number is changed
2. if the product is not in the database then insert it.

I'm stuck at the point that I can't retrieve if the database is updated, so I can either stop the query or insert the new product.

Java has a statement like getUpdateCount(), but ASP/VBSCRIPT??

I want the fastest solution, i dont want to retrieve the data twice and compare them to check if it changed..

View Replies View Related

Insert/update Record

I have to compare 2 tables: orderA and orderB, if the record exists in both table orderB and orderA, just do a update to the quantity field in orderB (add orderA.quantity to orderB.quantity). Otherwise a new record has to be insert into orderB.

Do I have to loop through the recordset of orderB, then use select statement to see whether the record exists in orderA or not, and determine whether to update/insert record? I am using Access database. I just afraid that looping through each record in recordset (maybe >=30 record each time) would make the transaction getting slow (or even hang??). Can I do this in one SQL statement?

View Replies View Related

Insert And Update The Same Time

I want to insert the element selected by the user from the drop down box in the DB(Access).Once the user hits submit i want it to insert this in the DB + i want to update one of the fields from True to False . how can i perform both these at the same time?

View Replies View Related

After Insert - Update Another Site

The data that is entered into my website needs to be sent to someone else. Currently it is being put into a MySQL database. In addition to this, a third party needs this information. They have something set up on their website where I can do this:

https://www.domain.com/update.exe?src=username&data=Smith,John,5,12,Rose,Charlie

I have no control over domain.com. How can I update the record, send the data to this URL, and then redirect the user back to the default page? Right now it just inserts the record and then redirects to the default page. I'm unsure as to how to do the URL bit. I would prefer if the user did not see the domain switch.

View Replies View Related

Multiple Insert/Update

After the page (transactions.asp) loads I want to allow the user to enter the number of transactions into the provided textboxes. Then, when the user clicks submit, I need to have all the hidden fields as well as the number of transactions values inserted into the transactions table of my database?

I have attached the database should you have any questions about the db table values and fields. Please let me know if you have any questions or need more information or files.

View Replies View Related

Insert / Update / Delete

can u tell me of a simple script i can use to do the following. I want a textbox to add a entry to the database with a submit button, then below all that the current database entrys are listed below also in textboxes with a UPDATE and DELETE button beside each entry.

View Replies View Related

Insert And Update Excel Data

I didn't know how to use asp to update or insert the excel data ....

View Replies View Related

Update/Insert On MSSQL Table Using ASP Forms

I have a problem that it's bothering me for some time now and i will need a lot of help from you. I don't know how easy or difficult it is to be done but i would appreciate any help.

I have an mssql 2000 db with table "table1". Attributes for "table1" are:

ID (Primary Key)
field1
field2
field3
field4
field5
field6
field7

I'm trying through DreamWeaver MX to create a form through ASP and Text Fields, so that i can update "table1" through the form and also on another page to show the results of my table.

I have created a form which will be accepting 25 rows, each row having field1, field2, .., field7.

I cannot seem to get it to update "table1".

Any ideas how this can be done?

View Replies View Related

ASP - Date Formating MySql Insert/update

I am storing dates in a mySql database in the format yyyy-mm-dd. Now, I have set up so that this field is insert by a form.

It isn't very user friendly to have to type yyyy-mm-dd, how can I set up so that the user can enter format dd/mm/yyyy and it will automatically insert into the database as yyyy-mm-dd? I am using Dreamweaver MX 2004 and ASP.

View Replies View Related

Executing Sql Command -- Insert, Update And Delete

how can i make the function return true only if the execution is successfull (see bold red below)? Currently the function is returning true wheather it is successfull or not. Code:

View Replies View Related

How To Declare Session Variables And Use In Insert And Update

how to declare session variables and use it in insert and update sql statements... the scenario is I have:

2 html forms
2 ASP FILES

I am able to trap data from the first form into the acces table..but my second form(which is continuation of first form) has a update query....(ie...it shld update the same record the one inserted from the 1st form )..both the forms work on table in access db

its an annonymus...questionnaite...therefore i am not trapping any user name or login id...but the requirement is the survey made shld be unique....as in no user shld be able to answer the questions twice.

View Replies View Related

Update Statment & Error :: Microsoft JET Database Engine Error '80040e14'

I keep getting an error when I try to run this update statment: [CODE]

INSERT INTO MYPosts ( IEname, country, server_name, LANIPAddy, license_ver, wrkstn1, wrkstn2, wrkstn3, wrkstn4, wrkstn5, notes, status, rdse, esc, eso, parent, , timezone, ) VALUES ( '" & lcIEname & "', '" & lcCountry & "', '" & lcServerName & "', '" & lcLicenseVer & "', '" & lcwrkstn1 & "', '" & lcwrkstn2 & "', '" & lcwrkstn3 & "', '" & lcwrkstn4 & "', '" & lcwrkstn5 & "', '" & lcNotes & "', " & lcStatus & ", " & lnRDSE & ", " & lcESC & ", " & lcESO & ", " & lcParent & ", " & lcTimeZone & ")"


I get the following error:

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression

View Replies View Related

Error '80040e14' Syntax Error In INSERT INTO Statement

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

SQL Server - Update/Insert Multiple Cols Into Multiple Tables

Just as the title says I am trying to do something impossible with a single SQL statement. I am doing an ASP webpage for internal use at the company I work for.

I want to know if there is a way to insert/update data into multiple tables in 1 SQL statement.

If it requires functions | views or anything else that is fine but I don't want to have 3-4 different SQL statements to update 2-3 different columns in different tables.

View Replies View Related

Error :: [Microsoft][ODBC Microsoft Access Driver] Syntax Error In INSERT INTO Statement

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

SQL Update Error

SQL gives an error but why?

SQL="UPDATE tblLog SET fldOffline=1 WHERE fldTimeIn='" & session("time") & "' AND fldUserName='" & session("admin") & "'"

and db is:

fldID=AutoNumber
fldUserName=Text
fldTimeIn=ShortDate(Date/Time)
fldSID=Number
fldOffline=Yes/No

Error:

Microsoft OLE DB Provider for ODBC Driverserror '80040e07'[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

View Replies View Related

Cannot Update Error

Page 1 displays a list of items. Click an item and move to page 2 where
full details of that item are displayed.

Page 1 works fine, but page 2 always displays the following error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object
is read-only.

I can't see anything wrong in the code I haven't used before successfully.

View Replies View Related

Update Error

Microsoft OLE DB Provider for ODBC Driverserror '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'dfgfgWHERE RequestID = 9'.

/saveSolution.asp, line 202

my codes:

View Replies View Related

UPDATE Error

Here is a clip from my script.

updatestr = "UPDATE users SET password='temp' WHERE email='test@test.edu';"
set RS = Con.Execute(updatestr)

this is the Error I get:

Microsoft JET Database Engine error '80040e14'

Syntax error in UPDATE statement.

/changepassword2.asp, line 35


This is line 35:
set RS = Con.Execute(updatestr)

View Replies View Related

Sql Insert Error

I'm working on an asp where I wanted to do a simple insert using data
from another table, structure is:
Table A has columns - ID, Code, Type
Table B has columns - key, FName, LNAme, DOB, cd, etc...

I need to insert into A, using only the 'key' field from B, rest of the
values in A will be hardcoded in (code='XYZ', TYPE='A')

I tried this:
insert into TableA
values
(select key from TableB where cd='app', 'XYZ', 'A')

but it didn't work, I kept getting an error 'Missing Expression', using
Oracle 9i.
Also tried speicifying the columns
insert into TableA (ID, Code, Type)
values
(select key from TableB where cd='app', 'XYZ', 'A')

View Replies View Related

INSERT INTO Error

look at my SQL command it is not working. It is giving me a syntax error

Act = request.form("Act")
NT = request.form("NT")

Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtest=dsntest & "DBQ=" & Server.MapPath("/db/invent.mdb")
Conn.Open DSNtest
Conn.execute ("INSERT INTO Table2 (TNumb, LogAct) VALUES (" & NT & ", '" &
Act & "')")

The TNumb field is numeric and LogAct is text. If I remove the TNumb info it works.

View Replies View Related

Insert Error

I am picking up the following error message which is strange as it has only started happening since I have transferred servers:

Microsoft JET Database Engine error '80004005' Operation must use an
updateable query./admin/news1.asp, line 59

sql1 = "INSERT INTO [News]
(strDate,Department,Title,ShortDescription,strCont ent) VALUES (" & strDate1
& ",'" & strDepartment1 & "','" & strNewsTitle1 & "','" &
strShortDescription1 & "','" & strDescription1 & "')" Set rsnews =
data.execute(sql1) Set rsnews = Nothing

View Replies View Related

INSERT INTO Error

this code below should in theory write three bits of info received from a form to a db:

level
score
playername

whenever i try to insert all three bits of info to a db i get this error 'Syntax error in INSERT INTO statement'i can however insert just the playername with no trouble. Code:

View Replies View Related

Update Syntax Error

strQuery2 = "Update tbCard_Temp Set tbCard_Temp.Id='tbCardSwipe.Id
From tbCardSwipe'"
and i get this message
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression 'tbCardSwipe.Id From tbCardSwipe'.

View Replies View Related

Sql Update Statement Error

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

Error On Update Query

I need help on this error that occured on one of the pages. fuunny thing that its happen in localhost and not in the web server. below is the code and the highlight of where error occured.The error mentioned in the page is :

Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.

/shop/confirmation21.asp, line 245 . can anyone kind enuff to let me know whats it about?

Code:

View Replies View Related

MS Access Update Error

I have an inline VBScript script to update a MS Access Database, unfortunately I get this error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

First of all, the code is flawless. I've been checking the last 6 hours. I checked security issues in MS Access and set to full read and write privileges. I then accessed IIS to make certain that full read write privileges were set.

I also went through windows explorer and made sure that read only was unchecked. I even attempted to create a virtual directory with the anonymous user IUSR_machine. All to no avail.Lastly, I went through ODBS sources and added my mdb file as a System Database.

View Replies View Related

UPDATE Syntax Error

The following error is appearing

Microsoft JET Database Engineerror '80040e14'
Syntax error in UPDATE statement.
/TestUpdate4.asp, line 111

with the following page. Been told has something to do with Field Names?????

View Replies View Related

Syntax Error Insert Into

I keep getting the following error message:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/ORG/HRM/medewerkertoevoeg.asp, line 50

I treid different solutions but here is the code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved