I have a tab deliminate text file that contains almost 60,000 lines and I need to get it into a database without uploading the file and running the 'LOAD DATA INFILE' SQL statement. Each line of the file will need to be inserted into a its own row in the table with each field in a specific column. The data looks something like this:
What I'm trying to do is match all buyer requirements in a database table to all available properties in another table. I then want all these matches displayed in a report with the buyer name followed by the relevant matching properties, this should occur until all buyers have been displayed with their matching properties.
The problem is that it only works correctly for the first buyer for which the correct properties are displayed, after that all I get is the buyer names without their matching properties... so it seems to loop perfectly the first time but from then on forgets about the inner loop! Code:
My last (maybe) problem is to make a nested menu (I think is possible only with Java) and I must take the names of the selections from a DB ... is possible? I can't find documents where is explained how to use MDB files with Java
I have an array of items and for each item I need to find sizes and and for each size I need to find colors The array of items comes from the previous page. Code:
I am using IIS 5.0, ASP and VBScript. I am puzzled by recurrences of errors when I nest subroutines, and I'd like to know if there are rules for that which I don't know. Would functions work better instead? I am not much of a coder.
SHAPE {SELECT * FROM Chapters WHERE SchoolID=320} APPEND ({SELECT * FROM ChapterLink} RELATE ID TO ChapterID) AS Advisors ({SELECT FirstName, LastName FROM LocalAdvisors } RELATE UserName TO UserName) AS AdvName
I get an error, "Column (UserName) does not exist in the appropriate rowset", which is correct, the UserName column actually exists in the ChapterLink table. But, I can't figure out how to construct this SHAPE command so that it works like that.
I want to loop through a certain number of records in the recordset and then create a second loop for the remaining records. How do I capture the last record on the first loop to use in the second loop?
I have taken over a program that uses a mixture of javascript and clasic ASP. However i am trying to get rid of the javascript and just use ASP.
However the code uses a nested recordset as the secpnd recordset needs a result from the first to run correctly. I have managed to change the code so that it goes through the first record but I can't get it to loop through the other recordsets. So it writes one results and then just a blanks.
Is it possible to use nested recordsets for more than one result? If not what are my options for fixing this problem?
I am not too sure wats wrong w the if-else statement below!
<%if(grp==grp2)%> { <%if (start==req || end==req)%> { <%=grp%> <%=start%> <%=end%> } <%else%> { <%="There is no such record found"%> } } <%else%> { <%="There is no such record found!"%> } <%endif%>
I have an ASP page where I build a html table dynamically by reading a database table and populating the <TD> cells with the fields of each record.
I want the last field to be a html drop down list that contains values read from another db relation in the same db. It would seem to me, (i'm novice) that this would require nesting SQL SELECT Code:
I am trying to produce a results page where the results come from three seperate tables.
e.g. The main query gets a list of results, for each one of those results I need to display data from another table. I have a list of bars, restaurants, hotels etc.
I want to display the details of those in sections (a bar section showing all the bars etc) each one of the bars is ranked by members. When I do this I get a "type mismatch" which I guess comes from the fact I am trying to equate an array to a single value. How do I get round this? Code:
When an HTTP 500.100 occure in IIS 5.0, I was getting redirected to a HTTP 500.100 -'page cannot be displayed' error page when there was an error, but now in IIS 6.0, I get 'Microsoft VBScript runtime error '800a01c2' ' nested within the page.
I'm trying to create my own error messages so it will re-direct to my own error page and send me an email. I used to be able to do this in IIS 5.0 but I can't seem to get it going in IIS 6.0 as it doesn't re-direct to a default error message.how to get IIS 6.0 to work like IIS 5.0, or is there another way of doing it, or is this not even an IIS problem.
Can someone tell me how to write this line so I don't get an error - I've tried various ways to nest the quotes,but I still get an error saying that an ")" is expected.
I have to read a XML file in ASP and save the values in a database. I can get this work, but I cannot read some nested nodes of the xml file. This is a part of the XML file: Code:
I am passing values from Supplier_Details.asp to Supplier_Products.asp, when I click to view the details of the supplier I want, their values goe to the other page ( supplier_product)that I want all his products to be displayed.
so far I can pass values and could be displayed, no problem but when it comes to displaying all the products, it;s then where I am stuck, with the previous tutorials ( nested repeat region) I can get it working and I tried to have that example working for all this, so far it;s not, so is it possible to do it ? Code:
I'm working on a new site that has a nearly empty index file (variable location) that includes a template file (set location) which in turn includes two data files (variable location dependent on index file's location). This concept worked in PHP and I'm just playing around with it in ASP to see if it can make my site management easier because I can't move to Apache for a while.
It seems that the template file can only include relative to itself and also with specific paths, but it can't include relative to the original index file.
This query sort on the basis of Lft and Rgt columns.
The name of the array is: aEmp.
My question here is how can I get only the LastName from the aEmp array into another array so that I can sort the names alphabetically and then display the employees in the alphabetical order.
Or is there is another way I could this by using the same array while keeping the lft and rgt sort of the query? If I sort based at the SQL query level, I can see the names sorted by the lft, rgt and lastname, but since the lastname is at the end of the sort list - it does not appear alphabetically.
In working with arrays, I have found that I am unable to dimension and array with a variable that has an integer value but I can redimension one this way. I haven't see any information that tells me if this is a requirement, although it appears to be because I get an error if I try it.
Ex.
Dim b b = 10 Dim a(b) ' this errors out but Dim a() ' this Redim a(b) ' works
I want to create a new array called arrNames2 and copy contents of arrNames to arrNames2.
I then want to loop through my db and add more names (while going through the loop) to arrNames2. What is the best way to do this? Do I have to keep redim the array wehn I add more names?
I have a page in my admin system where the user can edit products they have added. The problem I am having is with Related Products. These are all listed in a multiple list. What I need to do is have those selected when the product was added, already be highlighted in the multiple list on the product edit page. Here is my post from another forum.
For some reason, when I try to run the following array, I'm getting an error:
dim cat(0)
cat(0)="0407" cat(1)="0102"
'I will be adding more to this array, but just trying with two for starts.
for counter = 0 to 1
itno=cat(counter)
'I get an error when it runs through this function
Function rightvar(theVar,lengthNeeded) Dim sResult sResult=theVar if Len(theVar)< lengthNeeded then sResult= String(lengthNeeded - Len(theVar)," ")& theVar rightvar=sResult End Function
The problem is that in my 5 years of programming in various languages i have never really understood arrays (DUMB @$${lol}) What i want to do is offer an advanced search of a database table on my website. I currently offer the functionality so that the whole of the database can be viewed within the web page so that it doesn't need to be downloaded/need access to view it. What i need to do is run a script that takes all of the column headings that i have and put them into an array. Then with the array i need to output each element into a drop down box.
Ok what I have is a little script which runs through my stock compares how many of one item we have compared to what we need and displays the out come.
What id like to do is make an array with the item name so lets say If how many is needed is greater then 0 then add the name of that consumable to an array and move on until the end.
Then I want to use the arry to display each consumable on an order form. Anyone have any idea how to do this in ASP or can give me any advice on a better way to do it?
I have a form that has fields named Title1, Title2, and so on to title 12
I want to set up an array that goes through all the input feild values that I already put into variables such as Title1, Title2...so on. It then replaces ' with '' so the apostrophe can be entered into the database. So it:
Creates an array by looping through the variables that get the form feilds.
Then loops through the array and replaces the ' with '': Title1=(Replace(Title2, "'", "''"))