Print Returned Recordset
Is it possible to have a print button on a queried page to print just the table returned?
View RepliesIs it possible to have a print button on a queried page to print just the table returned?
View RepliesI need to be able to do a search (postcode) from a list of around 2500 addresses. I would like to create a temp table and for the returned recordset to be in a random order, until that is the user requests to sort by say Name, Address etc...
The order initially needs to be random because I do not want the same 'top' addresses appearing for the same postcodes...
I thought I could in the temp table assign a sort order column and then place a random number in it. If I choose a large random number range then the likelihood that the same record has the same number is low...
how would you put a record set in a loop so you can print out a whole db table? Code:
rs.MoveFirst
Do While rs.EOF = False
response.write (rs.userID & rs.username & rs.password)
rstEmployees.MoveNext
Loop
doesnt work
i make a data display page, its showing all records, now i want user just press print button, and that print all data on screen, secondly user input 2 dats From ..... To......, so data in between that day will print,
View Replies View RelatedNo error or any feedback that I can work with.
Code:
set objShell = Server.CreateObject("WScript.Shell")
objShell.Run "%comspec% /c NET PRINT GarchiveISLaser[color=blue]
>c:WUTempPrinter_Status1.txt", 0, True[/color]
objShell.Run "%comspec% /c PRINT /d:GarchiveISLaser c:WUTemp est.txt",
0, True
Set objShell = nothing
I can run these commands successfully from the command-prompt on the server
but from an ASP page, I get nothing not even an error. The Text output for
NET PRINT is a blank text file.
I feel something is different on the permissions side because this
code/approach use to work fine.
When I use self.print the browser launches the print prompt, then I have to manually press print... DOes anyone know how to get around this.
View Replies View RelatedHow is it possible to execute an exe from asp and get a returned string (no http headers in exe) ?
To run exe I use :
<%
cmdExe = sPath & "cgi-bin
equest.exe"
Set WshShell = Server.CreateObject("WScript.Shell")
sResult = WshShell.Run(cmdExe, 1, True)
Set WshShell = Nothing
Response.write sResult
%>
sResult always content "0" and not the string returned by exe file (something like "!!-1!blabla!blablablabla!")
- How is it possible to get the exe returned value ?
- Is there a solution with asp.net ?
When I do a query that I know has 2 rows, I get rs.recordcount equals -1. Same thing when it's just one row. I need something that gives me the number of rows.
View Replies View RelatedI am trying to update a record but it returns this error :
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Function'.
/performaindia/security/functionssys.asp, line 210
Now at line 210, I have this function :
rs.Update.
I am getting this error on selecting an option :
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'SystemUserOnly', table 'performaindia.dbo.SecurityTableFields'; column does not allow nulls. INSERT fails.
/performaindia/security/tablefields.asp, line 220
now the line 220 is an update statement :
rs.Update
I have a bit of a situation here, I own a job board and have multi-posting comapnies posting jobs to our database and we have returned values going back to them to tell them if the job vacancy was posted succesfully or not.
The problem I have is that our main ASP guru is of sick and the other is off away on business. I have pretty good knowledge of ASP but not as much as these guys. So I need to know how to send a response back to the posting company whether it has been succesfull in posting the job vacancy instead of sending back a page back displaying whether it was successful.
I define a recordset with a pagesize of 100 in my COM object and return this recordset to ASP. When I check my pagesize at the ASP level,it is 10 I assume this is the default.
I can set my pagesize at the ASP level after the COM function is called, but I would prefer to have this encapsulated within the COM.
I am not sure what way to do this, i want a specific row returned and displayed in asp but not in a text box, in acess and vb i ahve done this and its just a label but not sure in asp.
View Replies View RelatedI have an ASP/ADO application querying an SQL Server DB. I want know the most efficient way to determine if more than one row is returned from a query. If more than one row is returned, the user will be presented with a choice of which row to process. If only one row is returned, I want to skip this stage, and process that single row immediately.
I can think of a number of ways of acheiving this (eg. .recordcount) but I'm looking for the slickest and most efficient method.
I have a simple VBS to return some unless data (as a test) and it works correctly. Code:
View Replies View Relatedwondering if its possible to have some kind of searched word highlight! IE. every thing it throws up in return of search it will highlight why it has brought it up! so if search "a" all "a" in return results would be highlighted.
View Replies View RelatedI've got a DropDownlist with predefined numbers(5,10,15,20 etc.) which I
want to do a postback to the GridView pagesize, so that the user manually can
change returned rows. Is there a way to do that in the properties of the
Designview or must there be a code behind. If so, what is the code for this?
I am retrieving a response from another site but certain special characters such as ' (single quote) or "(double quote) and £ (pound sign are being returned as ?. The code i am using to get the page is as follows:
Set objhttp= Server.createObject("Microsoft.XMLHTTP")
objhttp.open "POST","http://www.mysite.co.uk/viewdetails-" & PrmRef & ".rsp",false
' objhttp.setrequestheader "Content-Type","text/plain"
' objhttp.setrequestheader "Accept-Charset","iso-8859-1"
' objhttp.setrequestheader "content-type","text/html","charset","iso-8859-1","application/x-www-form-urlencoded"
' objhttp.setrequestheader "content-type","text/html"
' objhttp.setrequestheader "Content-Type","application/x-www-form-urlencoded"
objhttp.send formData
prmResp = objhttp.responseText
I have tried setting various values for the requestheader as commented out above but with no success.
I'm currently developing on IIS 5, ASP 3 and MySQL 4.1 using the latest ODBC driver from MySQL.
Any time field I have return from the database is returned as the current date. I've tried every table which has a date, created tables which soley keep records on the date.
I've submitted the date from MySQL Query browser using CURRENT_TIME and from an ASP page. Both submit fine.
I've returned the record using a Recordset to move through each and filled an array using GetRows().
short n simple question: I want to display the number of records returned from a search. Code fragment as follows:
// d/b retrieval SQL code
SQLCode = SQLCode
Set objRS = objConn.Execute (SQLCode)
// displaying the returned results
Do While (Not objRS.EOF
<< spit out records >>
objRS.MoveNext
Loop
Now, is there an instance of objRS I can call that will just display how many records were returned? I tried objRS.Count on a longshot, but that didn't work
I have an ASP report that returns values from a SQL database and
formats the data in an HTML table.
I am trying to figure out a good way of using CSS to highlight the
table row that contains the highest value returned.
I tried storing the values in an array, and then used a function to
find the highest value. This worked, but then I couldn't really
figure out how to "tell" the report to highlight that highest value.
Could anyone think of an easier way?
i have an asp page which creates a object using server.createobject and uses its method.i get some garbage value.
example:
set obj1= server.createobject("test.test") ' test is a dll
tmp = obj1.method() ' it returns a BSTR string.
i want to display tmp in HTML. when i tried to print tmp like
<font><%=tmp%></font>
I have created a simple search engine which retrieves records from an access database using sql and displays them using ASP.How do I go about counting the number of records that have been retrieved?
View Replies View Relatedwhy a ADO recordset.recordcount would return a -1? I have confirmed that it has records in it by writing some values to the screen. Why can't I count the number of records returned though?
View Replies View RelatedI have this on my asp page SELECT * FROM company WHERE comName LIKE '*Tech*' If I run it against Access then it returns a few records but within my ASP page, no record is returned. Why and how to fix it?
View Replies View RelatedI have been using the following code to count the number of rows returned from a query:
Alldata = rs.Getrows()
NumRows = Ubound(Alldata, 2)
The problem is I am now having to limit the number of rows that it returns:
Alldata = rs.Getrows(300)
Now my NumRows always equals 300 no matter how many matches are found so my counter doesn't work. Does anyone know a way around this?I know that I can use SELECT COUNT(*)..... instead in an SQL query but that means making two trips to the server which I don't really want to do.
I am looking for a simple way to limit the amount of letters/Characters returned so that it does not throw off my pages styling. Basically I have the following: Code:
<%
Dim SomeVariable
response.write(SomeVariable)
%>
If that SomeVariable has 300 characters in it it will create a very large table that it displays in so, what I want to do is limit it to say 25 or 50 Characters and simply put like .... after it. Any Ideas?
Please help me in finding the code for reading the Return parameter value from an Oracle stored procedure through an ASP page. I need a javascript code for doing that.
Please friends it would be of great help if i get the exact code since my project is stuck up bcoz of this.
I've got a problem with an ASP page which calls a stored proc. The sybase stored procedure returns numeric values as shown: ...
View Replies View RelatedI've created a Stored Procedure which adds a new record and updates some more records and then returns the primary key for the added record.
The SP seems to work OK, but I'm having problems getting at the returned key in my ASP code:
"Item cannot be found in the collection corresponding to the requested name or ordinal."
A common error, but in this case I can't see why... I output the SQL instruction that is sent to the DB and have run it in Query Analyser and it runs OK and returns a single row, with a single column - the new primary key...
But when I try and access this in ASP, I get the error message....
I have an ASP search script that interfaces with microsoft indexing service that is shown in the header on all of my pages. My pages are pure div & table layout. Is there any way to load the asp search results into a table in a specific cell?
View Replies View RelatedI am looking to return the first 50 characters from a database field. Does anyone know if there is a SQL function that returns a defined amount of characters from a database field?
View Replies View RelatedI've been trying to find a simple way to count the records returned from a database query short of looping through the recordset and incrementing a counter.
I've tried the following without any success:
Ubound(select_rs) - afterall the recordset is returned in an array right? Ubound gives the following error: Microsoft VBScript runtime (0x800A000D)
Type mismatch
I've tried select_rs.count which gives the following error: VBScript runtime (0x800A01B6)
Basically, I've reached the point where I think I may have to loop through the recordset and count the number of records returned. Seems like an awfully inefficent way to do something so simple.