What is the best way to see if a record has inserted correctly into the datase in ASP?
Also, how to tell the user what the error is.
I am inserting like this with the ADO command object:
Dim sInsert, objCmd
set objCmd = Server.CreateObject("ADODB.Command")
sInsert = "sp_ADS_Insert_Driver_General_Data "
on error resume next
With objCmd
.ActiveConnection = oConnEnergy
.CommandText = sInsert
.CommandType = adCmdStoredProc
.Execute , , adExecuteNoRecords
Our graphic designer has just finished redeveloping our website. On the site, we use SSL to secure the area where a user enters their personal information to order items from us. (we do not do many transactions - maybe 1 per day...) We are a log home mfg company so they would only order plan books, maybe a video etc...
When the user clicks "Submit Order", we want to encrypt each data item (because of new legislation governing customer personal info etc...) and write a record to an access db. From here it will be imported into our Customer DB leads database...
I do not use ASP but program in VB 6 and Access 2000. ASP looks similiar in many ways...
Does someone have a good ASP script for encrypting data? And, if so, is it fairly strong encryption?
Also, is there any trick to writing an "insert" SQL script in ASP or is it exactly the same as I would do in VB or Access? Maybe someone has an "insert" script handy they could pass along including the command to actually execute it?
that's shortly the way i'm inserting new records. using mysql and asp functions.
The prob is that inserting only one record every time. if i got data for 3 records how can i make it at once to add 3 new records in some given order into the db
Application X has three screens. The user captures information on screen one and then clicks a navigation button to go onto screen two.He does the same on screen three. At the bottom of screen three is a submit button. When this button is clicked the system does some calculations with the information that is supplied and then uploads all the info that was captured on the screens to the database.
Should the data be uploaded to the database all on one go when the user clicks the submit button or should it be uploaded after each screen - ie when the user clicks the button on Screen 1 the data is uploaded to the database and then screen two is displayed.
I have a column call UserDate and it's properties are this : varchar(50) . I have a function which updates the column with todays date. for some reason, if I manualy give the value to be inserted a value of '10/10/2006' or use date() it inserts a value of 0 if I give a value of 4 to be inserted it works?
I have been working on a project for 2 days and this is the last piece to get it to work, can anyone point out where I'm going wrong. P.S I have tried giving the colum a date format but unfotunately the format is american and I need it in english to compare with something else I'm working on.
I'm getting a syntax error when I try to run this SQL Insert statement, can anyone tell me what might be wrong? Before I was getting a data type mismatch error then I removed the ' quotes around the intPhone variable. The error occurs on the line after the SQL statement.
I have a 2 asp pages for a registration form. The first one is where the user types the data, and the second one has a form that requests the data from the 1st one and then sends it to the database. Both are sending the data correctly (I've seen it on the error page) but it's not feeding the DB.
I have a website I am working on that I did not create. It is ASP and SQL based. There is a content management system created using ASP and saving in the SQL server database. A user can enter a news article into a big text box/area, and choose to add an image. The text and image are stored in the database via ASP and pulled out to the website via ASP.
The image shows up in the website to the top left of the article. I need to make it so the user can enter an image where their cursor is in the paragraph (like a word document) and have it also show up there on the website. Any ideas?
I have a form which the user fills and submits.i have insert statement there. When i submit the form to itself ,the values get submitted and inserted in DB easily.
If they use either a quote or double quote, but SQL statement bombs. Is there a way quick way to fix this beforehand? Conn.execute ("INSERT INTO PROBLEMS (Problem) VALUES ('" & Problem & "')")
Just like to know if I am correct and no problems in this scenario:
I have page where the user clicks a button to save some information >>
gets directed to page 2 where a value gets returned from a recordset and the form is inserted automatically upon loading with the value (sequential for the database table) >>
the user then gets redirected to page 3 upon insertion into the database, if I use 'Select Top 1 ......' as a query to retrieve some information on this page am I sure that this is the correct record just inserted even if 2 or more people are saving at the same time?
This is my code, for some reason, when I use this exact code it doesn't update my database, but if I use the next section of code it does. Anybody knows why that when I use two different "Insert" in If Then End If, it doesn't work? Oh and I did try the "If PID = 105 OR 151 Then" alone and it works well. Code:
I've been choosing to insert data ni my db using a recordset with methods AddNew and Update. I would like some advices to make my coding opractice better. For example: am I doing it right? Is there a better to do what I'm doing and so on...:
is there a way to write a insert statment with out typing out all of my field names? i want to do an insert in every field but i don't want to have to write them all out.
I'm using ASP + MS SQL. I wrote a simple insert into command but nothing is happening... it gave no error and no information is stored in the db. When I response.write my SQL, I got the following:
INSERT INTO [blog_entries](title,user,entry,date) VALUES('test','admin','test','Tuesday, December 25, 2007')
i have a few input box for the user to enter. but as u can see that both tables has execno. it's for both tables to connect. that's why i want to check on how i can key in one input box insert into execno in two different tables
Current setup: Sun server running Solaris 9, Apache, Chilisoft ASP, MySQL
I'm having problems inserting data into MySQL from an ASP vbscript insert page I am using Dreamweaver to create the forms for ease of use. When I try to insert a record via the table only the first field in the form is inserted into the database and any subsequent fields are ignored I tried creating a test table with just three fields (id (auto_increment), helptitle, helpinfo) The helptitle field is inserted fine and the record is assigned an ID but the subsequent helpinfo field is not inserted at all I then tried creating an insert page using ASP JavaScript and all the fields were correctly inserted
I'm currently having some major problems with an insert form that I created Basically, if a large amount of information is being inserted into the database I get an error This seems to be a restriction imposed by the host What I would ideally like to be able to do is to grab so many characters from the textarea insert this into the database and loop this until everything has been inserted (the information would all need to be inserted into the same field of a record) I've never tried this before so would appreciate any advice/tips on how to go about doing this
I have an Access database with Numeric fields. In my ASP code I'm trying to use a variable to enter those numbers, such as Insert into MyTable (Item, N1, N2) Values ('NewThing', v1, v2)
I have set v1 and v2 previously with numeric values but they are not recognized. Do I need to wrap v1 and v2 in some sort of identifier, such as "#"?
I am trying to figure out a way to insert all the records from a dynamic table - repeat region into one table as individual records. On the 1st page users select which items they want from a large list. When they click submit it passes the values ( IDs ) with a URL par to the next form. This form has a recordset that uses the URL par from the last page and creates a new dynamic table - repeat regon with all the records they chose. I need to do this so I can then add up rates for those selected items. I need to find a way to the add all those selected records now into one table. Also I need to have them insert each record at a time. So if 4 records are in the recordset and repeat region, I need to have it add 4 records into the table. Hope that makes since. Im a bit lost on this one.