Nested SQL SELECT Commands?
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:
View Replies
ADVERTISEMENT
I have been trawling the net to find a decent example of a way to connect to an sql 2000 server using asp.net and run a few commands.
One of the commands i need to run is: "EXEC sp_addlogin 'Albert', 'B1r12-36', 'forum2'"
how to do this, and display a 'successful' message on the page if the command completed successfully.
View Replies
View Related
What is the syntax for running say. a batch file (.bat) from within ASP?
For example... in MS Access you can say something like this...
----------------------------------------------------------
CurrentDBDir = "c:"
ShellWait CurrentDBDir & "runthis.bat", vbNormalFocus
----------------------------------------------------------
This would run the "runthis.bat" file located in the c: directory. How would one accomplish this same thing in ASP?
View Replies
View Related
Is there a way to insert a word page break into an asp script? I have a script which uses the MS Word Document.ContentType to display a long table and I'd like to insert a page break at certain points so I can print it nicely.
View Replies
View Related
i have an asp page and id like to run some DOS commands to copy files around on the server to a new directory on the server, and then run an exe afterwards. some sites tell me its as simple as Code:
View Replies
View Related
I'm attempting to print to a Zebra printer (barcode) by taking the results of an .asp page and sending the output to the Zebra printer, which will interpret the output / embedded Zebra Program Language (ZPL).
Thus, printing the output at runtime. Does anyone know how to send a dos command from an .asp page that will send the .asp result output to a notepad file then send the notepad file to the printer at run-time? I tried the following code:
View Replies
View Related
Can someone explain what kind of commands demand most attention/resources from server and how an internet server distributes its time among web programs/users. You can also refer me to certain pages where I can read through it.
As far as I know, people prefer using objrs.execute statement instead of other commands like .addnew or .edit etc. the problem is since I don't know much about this hardcore stuff of DB, I continuously have to ask people on ASPFREE to help me. although here people here are awesome but the problem is that sometimes it takes too much time so it's better to have first hand info in your head.
View Replies
View Related
Is there a way to tell an asp file which set of commands to run depending on what file they just came from?
View Replies
View Related
I'm trying to execute a Windows command in ASP. For example, this is a snippet of what I have right now:
....
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("notepad", 1, true)
Set WshShell = Nothing
The strange thing is that notepad.exe actually appears under the list of processes in Task Manager, but its window does not show up on the server's desktop; the client's browser just sort of hangs. I'm led to believe that this has something to do with IIS permissions, but I'm not certain.
View Replies
View Related
Quick question: how can I execute Windows command (like deleting liles from
server) via ASP?
View Replies
View Related
How can I use WScript.Shell to execute Ms-DOS commands and can I see the
outputs commands in the asp page?
In the past, using Win. NT 4 Server and cmd..shell attribute to a variable I
could write the results in the screen page.
Any sample?
I couldnīt find any samples yet for win. 2000,ms-iii 5.0 and asp in my help
files, tutorials and guides, etc...
View Replies
View Related
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:
View Replies
View Related
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
View Replies
View Related
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:
View Replies
View Related
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.
View Replies
View Related
I'm using the following SHAPE command:
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.
View Replies
View Related
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?
View Replies
View Related
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?
View Replies
View Related
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%>
Error: 'else' without 'if'.
else
^
View Replies
View Related
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:
View Replies
View Related
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.
View Replies
View Related
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.
Code:
response.write("document.write('<form method="post" action="message_send.asp?subject=" & _
Request.QueryString("subject") & "" onsubmit="return preValidate(this);">);")
Is there any other way to feed the result of an ASP function into Javascript other than by getting ASP to write out the JS as above?
View Replies
View Related
I would like to know what I'am doing wrong with this loop & Array's... Keeps over oading but unsure why... Would anyone know why and know a sollution?
ERROR:
Microsoft VBScript runtime (0x800A0009)
Subscript out of range: '6'
CODE:
For Each i in TArrSpl
For Each e in TId_Arr
IF TId_Arr(e) = TArrSpl(i) THEN
' CODE
ELSE
' CODE
END IF
Next
Next
View Replies
View Related
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:
View Replies
View Related
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:
View Replies
View Related
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.
View Replies
View Related
I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.
The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:
View Replies
View Related
does anyone know what I have wrong with this select in my form?
<%
sql = "SELECT * FROM [LTAB_CAProcessArea]"
Set ProcessAreaRS = Server.CreateObject("ADODB.Recordset")
ProcessAreaRS.Open sql, SessionCPRDBConnection, adOpenStatic, adLockOptimistic, adCmdText
%>
<select name="processarea">
<%
Do While Not ProcessAreaRS.EOF
Resonse.Write("<option name='" & ProcessAreaRS("processareaID") & "'>")
Response.Write(ProcessAreaRS("txtProcessArea"))
Response.Write("</option>")
View Replies
View Related
I don't know if this is in the right section. I hope it is.I have an HTML document that uses tables and stuff. I also have a FORM on there with some input boxes, Radio buttons and <select> options.
I have a .asp VB file also that processes the actual form and writes the answered questions to a text file on the server (tab separated)
My problem:
The input boxes and radio buttons work fine. It writes to the text file on the sever end.
My problem is I am not too sure how to go making the answers from the <select> options to also write to the server. They way I have it set up right now, it jsut writes "NULL" on the text file.
View Replies
View Related
I've recently come across using "Select Last" in an sql query. Does anyone have any info or views on using it? Until now I've relied on "Select Max" but Select Last would have distinct advantages when using random autonumbers. I'm also curious about why there is so little info on it - perhaps I'm looking in the wrong places?
View Replies
View Related
I want to display an editable page extract from MS Access table. Now I want to show the value in Select list, extract from another table. Both tables are joinable with the foreign key.
In simplest, I want to extract and display the exact value from a table and show in Select list for edit.
I could not think of any way. I can bring up data and display in Select list but it would display the first value in the list only.
View Replies
View Related
i want to select all ids from table1 where those id's arent in table2
Sounds simple and iam sure could be possible in a single sql statement
View Replies
View Related
I have the following SQL SELECT statement below that doesn't like the TOP 50 parameter. When I remove it, all is good. When I put it back I get "Incorrect syntax near '50'".
Code:
SELECT TOP 50 SSN, LName, FName, License_Certificate, Character_Identifier, CertificateNo, " & _
"tblIndividualInfo.IndividualID, tblLicense.LicenseID FROM tblIndividualInfo " & _
"INNER JOIN (tblLicense INNER JOIN stblLicenseType ON tblLicense.LicenseTypeID = stblLicenseType.ID) ON " & _
tblIndividualInfo.IndividualID = tblLicense.IndividualID " & strWhere & " ORDER BY LName, FName
View Replies
View Related