Inserting Into A Table
I'm having problems inserting into a table in an oracle database. I am reading in variables from a ASP form and trying to enter these into the database. however only numbers will insert, even though I can print out the string variables on the ASP page. IF I inclose a string value in the insert statement it works ok so there is nothing wrong with my SQL code. Code:
View Replies
ADVERTISEMENT
I have the following code but this is inserting manually. I want to make a query from table 1 and automatically enter the records into table 2. What needs to be modified? Code:
View Replies
View Related
I am right now calculating distance between 2 zip codes and storing them in a table along with extra information like a persons name and address and stuff like that.
For some reason for distance "0" ..doesnt get inserted in my table..? What do i need to do in my code so that "0" distance + information gets in the table since i need that info to be displayed later for people to make calls to those people with 0 distances.
View Replies
View Related
my database is access and i'm trying to insert data from a form into the table's fields in the same order they are written in the form without explicitly having to mention the fields' names.
e.g. (this is the prototype of what i want to do)
for x=1 to request.form.count()-1
insert into table1(fields(x)) values (request.form.item(x))
execute the sql
next
does anyone have an idea of the right syntax for this?
View Replies
View Related
I'm trying to insert a table to format a list of options on a dynamic page using VBscript.
The page currently displays the links in a list when the user chooses one from the drop
down menu. I would like the links to be in three columns, rather than the default
vertical list.
View Replies
View Related
i have really only been exposed to getting data from aSQL database and displaying it.I want to include a page in my application (like a form in Access i guess)with various text boxes and drop-downs + tick boxes.Then i want to click a submit button that inserts the data (providing is valid) into a SQL Server table.
I have had a search in google but nothing seems to explain this in its most
basic terms (errorchecking and inserting).Could anyone give me an example of this or some background about this functionality.
View Replies
View Related
I'm trying to insert into a table with foreign keys. The statement works in query analyzer but not when I do it in asp to insert the data from a form. Code:
View Replies
View Related
i am trying to use the 'Insert into' sql query to insert data in an asp file but having some errors...this is the eror i got from the browser..
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/AddConfirm.asp, line 46, column 36
sql="INSERT INTO tblMembers VALUES("8"," & DateJoined & "",""& Title& "",""& LastName& "",""&FirstName& "",""& DOB & "",""& AddressUnit&"""
this is the code i have in my asp file....
Code:
View Replies
View Related
If I am attempting to add multiple products to an existing Customer-Products
linking table do I do this via an Insert or Update?
The first time I enter a customer in the database I would obviously do an
INSERT into the Customer-products linking table.
But, the second time I wish to ADD new products as well as possibly
overwrite existing ones......
I am getting twisted what the correct approach is?
View Replies
View Related
if it is possible to insert and update records in a database from the data that is in an HTML table? I have a program that converts data to an HTML table and would like to be able to insert/update records to the database on the webserver.
View Replies
View Related
I have an .asp page that contains a drop down menu, that when a selection is made, reformats the page to one of 22 different .asp pages. When clicked, the drop-down disappears and the options from it are formatted as a list on the left hand side of the page.
I need to format this so the list is in 3 columns, with the secection bold. I think I need about 4 if..then statements, but I've never done this before...here's the specific code, the code for the drop-down is first, then the code for the "quick link" list: Code:
View Replies
View Related
Would someone be able to explain the sql image field to me. I was reading about it a little but dont really understand.
I would like to have word documents that can be indexed and searched and i heard the image field with an accompanying char field with the file extension would be the trick. how would i actually get binary files into the image field?
I wanted to write an asp script so users could enter .doc that they could query. I understand basic asp sql inserts.
View Replies
View Related
I have aproblem to transfer a data from table x to table y based on id. Its mean when 2 table have same id all data table x must move to table y. I don't know which command need to use is it insert into or update?
<%
Dim conn
Dim rs
Dim MYSQL,MYSQL2
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Set cmd = Server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "DSN=prmm;UID=administrator;pwd=sa"
conn.Open
startdate=request("tarikh1")
enddate=request("tarikh2")
MYSQL = "SELECT * FROM table_x where paymentdate between '" & tarikh1 & "' and '" & tarikh2 & "'"
rs.open MYSQL,conn ....
View Replies
View Related
I am trying to display the content of a Table called
'Order Detail' directly from the database (e.g., Northwind.mdb). I have the following commands:
Set tableSet = Server.CreateObject("ADODB.Recordset")
tableSet.Open table_name, DB_name, adOpenForwardOnly, _
adLockOptimistic, adCmdTable
where, table_name = ''Order Detail" Or
table_name = 'Order Detail' Or different variations.
I always get error on the second command with the following message:
Syntax error in query. Incomplete query clause
which I believe because of space in the Table Name. How can I resolve this issue? (working with file or table name with space)?
View Replies
View Related
I have a table with many txt boxes which i have inside a form with a submit button to an update page which adds all the details to a db. The problem is i have a another table inside the first e.g. table 2. i want to be able to update table2 by clicking a second submit button that would update it. Is it possible to have a form within a form or how can i do it??
Also i need to update the entire table in one go. For exampple if i have 3 records in table2 i want to be able to update them all by clicking the one update button. Code:
View Replies
View Related
Have an app which dynamically creates table rows depending on records, these can be several hundred (don't ask). Hence a very long page at time. Each row includes a hyper link to a new page, and a link back to the original page.
Is there any method (maybe via js) where on leaving the second page l can redirect the browser to the table row the end user clicked on? Hence the bookmarking. Can do this via Visual Basic on the desktop app, but can't work it out on the web app.
View Replies
View Related
I have a table produced with names across the top and services down the left hand side with boxes for numbers for people who recieve services then the info is written into a table in an access db. That works fine and here is that code:
View Replies
View Related
I have two tables. Table A has 20,000 records, Table B has 2,000 records. Table A is what needs to be updated from the data in Table B. Only some fields will be updated and of course, only some records - both tables have the same field as a ClientID so matching up records should be easy.
Anyways, been a while since I have used ASP to work on things like this but would like to work through this one. I understand the process I believe, it is just how to make it go on to the next record once it has finished updating the first.
Basically, I was thinking of having it set up to reaad the top record from Table B, update applicable data in Table A. Delete that record in Table B. Move on to the next.
View Replies
View Related
Hello I have a page for registering users.
I am reciveing this error:
The following errors occured:
- An error occured. -2147217904 : No value given for one or more required parameters.
there are students and teachers. therefore I have 3 tables one for logins and one for staff and on for students.
I have a form designed to capeture the need information.
in the code I am runing an if and elseif statmetn to determin the tables. I then insert the userid and password into the login table.
then i enter the remaining information into ither the staff or student table. what i am trying to do is select the perimary number that is generated as the userid and passeword are enterd. and add this to the second table. Code:
View Replies
View Related
There i seem to be having a problem when inserting certain characters into my access database using a form, mainly (') characters.
View Replies
View Related
I get the following error message
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/weblinkup/chat.asp, line 1775
oConn.Execute("INSERT into chat (username,nametext,roomname,type,priv,thetime,msg) VALUES ('" & username & "', '" & username & "', '" & Roomname & "', 'msg', '0', '" & now() & "', '" & username & " has just said " & emotetarget & "." ')")
what the problem is with the code?
View Replies
View Related
i have a database Access with Book Table and Author Table. now i have created a form which inserts info submitted into the Book Table, yet it keeps giving me this error "You cannot add or change a record because a related record is required in table 'Author' " while the names of the authors are all registered.
it works in Access but not in asp it doesn't make much sense. People just enter the names of the books which their authors are in the Author table. it keeps giving me error. how to know why this is so?
View Replies
View Related
I have an error as follows:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not bulk insert. File 'c:mydata.csv' does not exist.
My mydata.csv file is inside the directory i stated. But why does the server complains that the file is not fould?
My codings:
strSQL = "BULK INSERT NAME FROM 'c:mydata.csv' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR =
'
')"
Response.Write ("test")
Set oRS = conn.Execute(strSQL)
View Replies
View Related
I had some Error when i write the update sqlp query
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/fyp/Quiz/updateQuiz.asp, line 21, column 77
SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")"
Code:
SQL_query= "update Activity_Status set UserID = '" +Request.Form("username") "'" "where Score = '" +Request.Form("QuizScore" + "'")"
View Replies
View Related
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')
View Replies
View Related
I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ??
Ex :
I have 2 arrays :
arr1 = Array(1,"allo")
arr2 = Array(2,"bonjour")
Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily?
If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all
View Replies
View Related
how do i design my site interface such that users can insert smilies along with text in the form field just like it is here on sitepoint...
View Replies
View Related
i've tested my code and it seems to send back an error, when i'm trying to insert a record into my db (sql server)
Basically when I udpate one of the records it's fine ( I update at a certain "productID")
But when I insert a new record it sends back an error telling me that my "productID" can't be a null value?Any ideas on how to fix this?
View Replies
View Related
When I insert info into a DB from a form, it cuts the string off at the first apostrophe (").
How would I make it insert the data as-is, with the apostrophes? Here is the code used to insert the Data:
View Replies
View Related
I am developing web pages , therein doing database
connectivity using ASP with Microsoft Access.I want to
insert a file (.opt/.pmopt) into a field 'OLE Object'. Also
I want to display that file name in tabular form and a link
to download that file.
View Replies
View Related
I am trying to make a web-based front-end for one of our programs. I'm running into a problem. Here's a sample of one of our tables:
Code:
CaseNo ChargeCount ArrestCharge FiledCharge
123 1 13 13
123 2 14 14
199 1 03 03
The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount
View Replies
View Related
Im doing a update page and noticed this error, whenever you want to write for example "can't, i've" it errors on submit, but characters like "." are okay. Why doesn't it like these characters and how can i make it like them? I need some extra code?
View Replies
View Related
I have the folllowing page where a user can add a review to the website. So far the page works fine, but on the review rating section I know that the rating is between 0 - 5.
But its posible for a user to enter 1000 if they wished, which still means the page works but the answer is too high.
Also if they write text in the field it errors the page. How do i code this so that they can only enter a number between 0 and 5 and only a number and not text.
View Replies
View Related