Field Order For Adding To Tables
if the order of the fields in a query matters when querying a table with asp. that is, if the table has columns labeled "RecordID, FirstName, Initial, LastName, etc" in that order, do i have to do my "INSERT INTO" command with the fields in that same order, or could i do "FirstName, RecordID, LastName, Initial, etc" ? i think it doesnt matter. am i right?
View Replies
ADVERTISEMENT
is it possible to dynamically add a field into a table? or add a table? Lets just say that I have a DB with 10,000 entries and about 5MB in size. I want to add a new feature and for this i need to add an extra field to the table. I don't want to d/l the DB, make the changes locally and then u/l again, so can I do it via script?
View Replies
View Related
i have 2 tables;
table01:
fields are
field01,field02,field03,field04,field05
and another table
table02:
fields are
field01,field02
when someone submits the form, i want to add the infos supplied by the user to be added to these 2 tables.
field01 & field02 shall be added to tables 1 & 2;
&
field03,field04 & field05 to table01 only
i tried using this code:
myquery = "INSERT INTO table01 (field01,field02,field03,field04,field05) VALUES ('" & f1 & "','" & f2 & "','" & f3 & "','" & f4 & "','" & f5 & "')"
myquery2 = "INSERT INTO table02 (field01,field02) VALUES ('" & f1 & "','" & f2 & "')"
adocon.execute myquery,myquery2
but this one only adds to the first table.
can someone tell me how to fix the problem?
View Replies
View Related
i run a classified ads site that allows people to post ads, and stores the results in a ms access database.
2 of the imput fields are: price and quantity
What i am trying to do is the following:
To add all the prices and and quantities together and be able to display the results on my site for example my database has the following:
Price | Quantity
2.00 | 300
1,50 | 1
10.00 | 10
140,00 | 7
and on the website i can display the results like so:
Current ads worth: 1681.50
I need the script to ignore letters as in the quantity field people have also added word such as packs and VE ETC so i need it to ignore letters, however in the price field some people have placed the ( , ) sign in there price so the code must recognize ( , and . )
View Replies
View Related
i have an instance where I need to add records to 2 different tables. i know how to do it basically, but the problem is, one table is generating a key number and i need this number for the second table records.
how do i put the appropriate records into the first table, grab the id number and insert the records into the second number? the information is coming from a form. i'm developing in an access db but will be moving this to an ms sql db before it goes live.is there a stored procedure that might make this easier? i know nothing about stored procedures.
View Replies
View Related
I have a form that uses Code:
<select name=player_id multiple>
<option player_id="<%=player_id%>"><%=FName%> <%=LName%></option>
</select>
To create a drop down selection list. What I want to send to a table is FName and LName instead of the ID. Any hints on how to do this.
View Replies
View Related
I know that the order of from fields from a form post are somewhat random. But, what about fields that have the same name -
<input type="text" name="something" value=""> First Choice
<input type="text" name="something" value=""> Second Choice
<input type="text" name="something" value=""> Third Choice
<input type="text" name="something" value=""> Fourth Choice
First = "bananna"
Second = "orange"
Third = ""
Fourth = "apple"
Will the values, in the delimited list contained in Request.Form("something"), always be in the order they are in the form? That is - bananna, orange, , apple
View Replies
View Related
I have a form with stacks of fields. This is submitted to a formmail.asp script at my isp which emails the values in the form to me.
Is there anyway using dreamweaver that I can define the order of the form fields when they are submitted to me via email? I eventually add the values in the form to a bit of paper, it would be handy if the email could have them listed in the order they are printed on on the bit of paper.
View Replies
View Related
How to I add a hyperlink sort on a field so that the end user may sort either asc or desc?Here are the file and .inc file.
View Replies
View Related
i know this is a very lame question but dyu have any idea on how to add all the number on a specific field?
for example
AGE
3
4
7
4
6
8
then i want to get the average age...
is there a sql command for this? and how do i display it on my asp page?
View Replies
View Related
I'm writing a database admin page in ASP. I had it adding records correctly. Then I added an autonumber field ("ID") to the table, and it stopped working. The sql I'm using is Code:
View Replies
View Related
Is it possible to retrieve data with ASP sorted on 2 fields? I've tried :
SELECT * FROM [TableName] ORDER By Field1 AND Field 2
But it gives an error. I've searched the internet on this topic to no avail.
Is it possible?
View Replies
View Related
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
View Replies
View Related
I am using a Relational database for my site and i have the following tables:
FIXTURES, GAMEDATES
the fields in FIXTURES are:
GameDate
Home
Away
(All of the above are numerical fields)
the fields in GAMEDATES are:
DateID(integer)
GameDate(#Date Field#)
What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)
The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:
WHERE Fixtures.GameDate<=(Date())
obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.
The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.
Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data
View Replies
View Related
Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData
This will work when comparing other fields withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?
View Replies
View Related
I have a code looking like this, but i can't seem to get it to work:
strSQL = "SELECT * FROM files WHERE Subject = 1 ORDER BY ID DESC"
What am i doing wrong?
View Replies
View Related
This is a follow up to a question I asked two weeks ago which I thought was solved but on further inspection I realised it wasn't working fully. I have an ORDER BY on my search results page, the search uses two dropdown menus, the first one is start character (A-Z), and the other is grade.
The problem I have is that the ORDER BY work perfectly when I leave the start character dropdown blank, and when I use the grade selection dropdown, but when I select a start character I get this error message:
Microsoft JET Database Engine error '80040e14'
Characters found after end of SQL statement.
/html/advanced_comic_search.asp, line 56
Can any one shed any light on this for me?
View Replies
View Related
I have records which I want to display a certain way, i.e. the records are in the database like this:
24TR
9L
133JF
But I want to display them as:
9L
133JF
24TR
Is it possible?
View Replies
View Related
I am using an sql inner join like below:
strSQL = "SELECT * FROM tblPage INNER JOIN tblNews ON tblNews.NewsID=tblPage.pageID ORDER BY newsDate DESC"
However this orders both by newsDate which causes problems with the ordering of the page, As I want the page not to be ordered just the news item.
View Replies
View Related
An ASP page outputs data from the query
"Select ThisAndThat from comments WHERE pageURL='" & pageURL & "' ORDER BY
threadID, datesent"
(Access mdb)
threadID is a string (OK, I know!), which means that 103 displays before 99.
Is there a way to write the SQL query to order them numerically? This would
be much easier for me than changing the data type and hunting down every
page that INSERTS or UPDATES the db.
View Replies
View Related
I am extremely confused about how i should go about doing this:
I have puled out current orders and have displayed in a table .These orders have their own order numbers.
Once the person clicks on first order,the order is displayed in a form,where the user can edit the order details and hit submit.
Now when he hits submit ,I want his to go the previous page where the orders are displayed in table ,so that he can click on the next order and process it/OR may be whent he user hits submit ,i want the next order directly to be displayed in the form.
View Replies
View Related
I have a table in my database with several numbers.(2, 5, 8, 0, 9, 0).Now i retrieve the numbers to my page using "order by numbers", and my page look like this.
0
0
2
5
8
9
I want the lowest number to be first, but if the number is 0 (zero) I want it to go to the bottom.Can that be done
View Replies
View Related
At the moment I have:
SQL = "SELECT sample.* FROM sample WHERE (id = " & teamid & ") ORDER by pos"
Which orders my players like:
ATT
DEF
GK
MID
in alphabetical order.
Is there anyway to specify this order so that it still orders the players by "pos"(position) but in this order:
GK
DEF
MID
ATT
View Replies
View Related
i want to order by NUMBERS:
BUS n 1
bus n 2
ect.
bus n 10 bus n 11
But the order goes like this:
bus n 1
bus n 10
bus n 11
bus n 2
how can i get right order:
bus n 1
bus n 2
bus n 10
bus n 11 ....
View Replies
View Related
I am performing a basic sql query. select * from tablename order by featured asc, id asc
BUT...I want all those listings with FEATURED as a Y to show up first.
All other listings should show up afterwards.
How do I do this? I may be thinking too hard about it.
View Replies
View Related
I have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.
I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.
I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).
View Replies
View Related
I have one table wich has a unique ID feild for each record and other feilds, and another table that has one field that is a number that contains the an ID from the other table and another field that contains some text.
I want to open with sql the first table, but order its records alphabetically by the text in the second table. is it possible? Code:
View Replies
View Related
I have used ASP for years using MS Access and have used MSSQL quite a lot as
well. I have never came across something like this before.
MSSQL table names and types:
ProductName nvarchar
ShortDescription nText
ThumbNail nvarchar
etc
When I have the recordset in the order as follows, all works well:
(Recordset2.Fields.Item("ProductName").Value)
(Recordset2.Fields.Item("ShortDescription").Value)
(Recordset2.Fields.Item("Thumbnail").Value)
Though if I have the Thumbnail first the description does'nt show.
View Replies
View Related
I've got a site with PayPal and Google Checkout payment options. The checkout page formats two HTML forms, containing bespoke cart code - one posts to PayPal, the other to Google Checkout.When an order is placed, it needs to be updated back on my site, so that the order is marked as 'paid' in the database. When this is done with PayPal, I just provide a hidden field in the form called 'invoice' containing my id number for that transaction. This is returned in my IPN, and I update the database accordingly. However, I can't find a similar field in Google. Their example code all seems to be in XML and is WAAAAAAAAY more complicated than I need it to be. I just need to send a value with my cart code to Google Checkout, and have that value returned after the transaction has completed.
I've set up Google Callback, and the page is being called and the order is being written to my google log txt file, I just need this to contain my order id number for the transaction so I can just add the logic to update the database based on this id number.
View Replies
View Related
Does anyone know how to organise data in alphabetical order when using a select statement???
When i use mine, i have been using ASC and it justs put the newest record added!
View Replies
View Related
I've written the following piece of code which is embedded in HTML. For some reason when the script is processed the last response.write statment is displayed before the information in the while loop. I can't seem to figure out why this is happenming.
Any ideas? Code:
View Replies
View Related
I'm working on a list of members.In my db I have two columns lastName and marriedName
lastName is the member name before they got married and legLastName is their lastname after they got married.
Now I need to display theese two columns in alphabetical order in one list.
If I for example have theese members:
lastName, marriedName
Anderson, Johnson
Petersson, Svensson
Nilsson, Persson
Lindgren, Johnson
I want this result:
Anderson
Johnson (look for Andersson)
Johnson(look for Lindgren)
Nilsson
Persson(look for Nilsson)
Petersson
Svensson(look for Petersson)
View Replies
View Related
I am processing the variables from a form submission with a for/next loop. The problem is that the order of the variables are NOT written IN ORDER.
Form field 1 prints fine but then it jumps to Form field 9 and then back to Form field 4 then to Form field 2, etc. IS there a way to process the form variables in a loop in ORDER? field 1, field 2, field 3, etc? Code:
View Replies
View Related