I have a DB that contains several columns named Line1, Line2, Line3, and Line4. After that I there are 50 columns named Data0 through Data49. Data0 and Data1 will always contain text but Data2 through Data49 may or may not be empty.
I am trying to take the values out of the database and put them into arrays. Since Line1 through Line4 never change I have no problem getting them into one array but I am lost on the logic/syntax on how to not only determine how many Data(n) cells are populated but then how to get them into a new array.
When displaying data from a database, how can I limit how many columns are displayed on the page?
I am trying to build an image gallery, and I want it to be 5 images across by x number of rows. I know how to make each image it's own column, or it's own row, but I don't know how to limit how many columns are displayed per row.
I have a standard formmail contact form that I would like to customize the recipient on. In other words, I want to be able to specify the recipient in a string in some cases, but when it is not specified have it send to a default recipient. What's the easiest way do accomplish this?
I've probably done this before, but for the life of me I can't remember how I did it. I need to move values from a DB table into an array to be used for other queries. The number of records will vary, so I need to make the array dynamic. Can someone remind me how I can increment the index when I write a new record? Code:
I want to know the number of records in my database when performing a query by sql. I am getting -1 as number of records.
<% connectme="DSN=hotel" sqltemp="SELECT Count([All Rooms].Engaged) AS CountOfFREEROOM FROM [All Rooms] GROUP BY [All Rooms].Engaged HAVING ((([All Rooms].Engaged)=False));" set rstemp=Server.CreateObject("adodb.Recordset") rstemp.open sqltemp, connectme, adopenstatic howmanyrecs=rstemp.recordcount response.write howmanyrecs & " records in<br>" & sqltemp rstemp.close set rstemp=nothing %>
my project is on an online hotel reservation. I want to have the number of rooms available each time the page loads.
I have a database of Company titles that I want to grab from an access database, put into an asp array and then pass it to javascript so I can output it into a CSS styled javascript menu. Right now I am stuck on how to exactly put the database entries into an asp array. Below is what I have so far.
So I want it to return distinct entries from the Title field and put it into the array called Titles after the asp code has done an HTMLEncode to make sure I can also pass it along to another asp page. Basically I need to know what to put after the Do While NOT Rs.EOF. Code:
What I need to do is to create a form of a dynamic size, and then save everything from the form in a database. The number of forms depends on a number from the database which I know how to get. I need to have a comment and a number, for example if the number from queried from the database is 2, then I need 2 forms, and it would be something like so:
Comment: Something Number: 4
Comment: SomethingElse Number: 6
When the user clicks the submit button, this would be saved in a database in a table, in a new row. I have the database created and inserting works very good when inserting just one row, but I need to insert more then one row at a time, so it would be something like this: Code:
I need to populate an array with two columns of data from a database eg Firstname and second name and sorte alphabetically. So both of these columns go in to one array, I found this code.
I have an articles_tbl . How do i create a select statement which only brings back the latest 3 records added to this table (the database has a field called 'date_added') so the information of when they were added is present.
I was just wondering how to bring back only THREE records and showing them, instead of bringing back the entire table content and then showing three out of them..
I have a static array with 10 elements in it. I am trying to create an update form for a mysql database.
I want to get the info from the database to populate the field of the update form. My select box is populated by the array and I want the value that is stored in the database to be the "selected" element in the select box(= to array element). I hope this is making sense. Code:
I have about 26 checkboxes that place all of my contacts into categories so in my database for contacts i have a field called categories that contains all of the categeories that each contact belongs to seperated by a ",". 1,5,17 etc.
I need help getting these values out of the database so that when I user select category 17 they get all of the contacts that containg the 17 in their respective categories field.
I am trying to write an array of random numbers to a database. The array part is working fine, but when I go to update the dataabse, it inserts the last value of the array into all the fields in the database .....
Dim MyValue,sqlRandom Dim arrayRandom(8) for i = 1 to 8 Randomize MyValue = Int((100 * Rnd) + 1) arrayRandom(i) = MyValue response.write "<p> Array Value:" & arrayRandom(i)
I have this dynamic array(shown below) that I need to match to values (1 - 10) that I am returning from the database via DSN connection object.
The values I need to match are on the same page (in their own table) but I am not sure how to match up the array indexes to these values. I want to be able to display the array result as part of or nested in another table. Code:
I want to set up a simple database for my mom to enter her recipes into. I am going to use Access and ASP. In the database, I will have five fields (Recipe_ID, Recipe_Title, Recipe_Ingredients, Recipe_Instructions, and Recipe_Image). When my mom goes to enter a recipe, I want to ask the form to ask my mom how many Ingredients?
She will then specify "n" number of ingredients which will cause the page to display "n" number of text boxes. I can figure this part out myself. When the form is submitted, I want a script that will read and concatenate the ingredients, wrapping <li> tags around each one. The challenge for me is the reading of an undetermined number of form elements?
I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?
I have a small doubt, my access database has been moved to SQL Server. Now I had some columns say [Where NoP] and similar many such columns. Are these columns going to work, since some of my queries are returning error. When i change the column name to say WhereNoP, it works fine, but in that case, I have to check around 300 forms where the column name is mentioned. So any clues to make such column types work.
in master batch table i have various master batch like 200701-0001 200701-0002 200701-0003
Now each master batch can have multiple final mixed batch like
200701-0001-01 200701-0001-02 200701-0001-03
and this record is inserted in to fmix table.
so i have a form in which i have a dropdown menu in which all the master batch is listed, i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,
how to achieve this
so in short each master batch will have more than one final mixed batch.
pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.
I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.
How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?
I want to make a listbox which will show the results of two fields (the ID and the Name) of one table , but the one field (ID) will be the one to pass.
I have a SQL 2000 table with data I display in three columns. The code I am using sorts the data horizontally but I need it sorted vertically. Here's the code I am using. Perhaps somebody can help me find a way to modify it.CODE
response.write "<table width='100%' cellpadding=1 cellspacing=0>" if not oMain.eof then count = 0 do while not oMain.eof if count mod 3 = 0 then 'there are 3 in the current row, so end the row and start a new one...
Is there a way to make dynamic columns? I'd like the data from one field to be the column in a dynamic table. What i'm trying to do could be compared to a pivot table in excel.
there are many ways to make this happend but what is the best way of printing sql records in non divided number of columns-say 5 columns? say you got 10,000 names and you want to print it in 5 columns, that is a poor drawing of 12 records in 5 columns:
1 2 3 4 5 6 7 8 9 10 11 12 ...every one of this 12 is a name
printing a name + checking if is there some ditails reffered to this name in other table column...
SQLGetInfo1 = "SELECT * FROM kalender ORDER BY year DESC, month DESC, day DESC;" Set rsGetInfo1 = DBConn.Execute(SQLGetInfo1)
Now I want to drop all the names of the columns, that is the field names, into a 1-dimensional array (or perhaps some ordinary strings, doesn't matter), but how do I do that? I tried with some rsGetInfo1.Fields.Name() and stuff like that, but the bottom line is, I don't really know how to fetch that property.
I have to fix an asp database site, that may or may not have ever worked properly. I keep getting the following error:
"ADODB.Recordset error '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal."
I have researched and found that this is happeneing most likely because the script is requesting a field that doesn't exist in the database (maybe a mis-spelling). I can't find the code to display a list of columns in the database.