As Simple As Returning Records And Output Parameter
I have a .asp page which includes "connTest.asp" which includes "adovb.asp" which includes all ADO constants definition, as mentioned earlier, if the adSomeLiteral=SomeValue constants didn't load the correct value I would get a RUNTIME Error(so constants IS NOT the problem),
the connection is setted up correctly, the command and parameters are created succesfully, the store proc works fine since I tested with ALL cases from Query Analyzer, even I tested the store proc from ASP environment, I call the SP as follow: Code:
View Replies
ADVERTISEMENT
I got a problem returning parameter. I am storing date using datepicker to choose my date. But when i want to delete it from the table because date is one of the primary key. it has problem when i retrieved it because it is recognized as datetime but when it display it's a text. i need 2 convert from text to date. how would declare my parameter then?
View Replies
View Related
I developed a store proc that returns a ResultSet (as a result of a SELECT statement) and an INT value (as a result of a SELECT COUNT(pKey) ... statement)
Now the problem I'm facing is with the front-end application. I'm using ASP and I wrote this code just to test what version of the output parameter works OK:
'The Connection and Command objects are created succefully, since I can display the records, and the store proc works OK too because I tested it from Query Analyzer displaying the expected results.
......
View Replies
View Related
I have a seach function and I need to be able to only return records that begin with numbers.
SELECT * FROM [Tbl_Table] Where name LIKE '0-9%'
View Replies
View Related
I'm back with the same code, which works fine, except for when i ad the block of code that i noted...i get the error message:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/test/testbasket.asp, line 72
which is referring to the strSurvID=adoRSWEBtest4(0)
i know that the query above that is supplying webtest4 with its where check is returning a value. when i take out the noted block of code, the page works fine, and emails all information, including the value that is being checked for in webtest4. Code:
View Replies
View Related
I just want to return the number of records in a database:
<%
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT COUNT(*) FROM alumni_baby"
cn.Open ("dsn=mssql;database=web;uid=aaa;pwd=aaa;")
rs.Open sql, cn
%>
<% Response.Write (sql) %>
But that spits out the sql statement, not a number. What am I doing wrong?
View Replies
View Related
How does one return records in a recordset based on a time/date field. If todays date is 8/25/04, how could i return all those records from 8/25/04. Mind you, i have long date format ex. "8/25/2004 4:46:45 pm"
I dont want to user a form for this i simply just want these time- sensative records to be returned in the recordset .
View Replies
View Related
Please guide me. How can I output the records from my recordset in columns in a table? That is, instead of just one record per row in a table, how can I have multiple records per row?
View Replies
View Related
What is a faster/better coding practice?
Method 1:
Code:
Sub myFunction(byRef x)
x = x + 1 ' do something with x
End Sub
x = 7
myFunction(x)
response.write x ' shows 8
Method 2:
Code:
Function myFunction(x)
myFunction = x + 1 ' do something with x
End Function
x = 7
response.write myFunction(x) ' shows 8
Also discuss considerations when there are more than one variables that need to be changed.
View Replies
View Related
A system I use uses advanced encryption for passwords. It was taken from some sample script and adapted some where. However this was I think intended to be for passwords. So nothing too long.
However the time has come where I need to create a function to encrypt a large amount of text. It has to encrpt a large amount of text but nothing too advanced is needed to be honest. Just so its unreadable because its written to a text file on drive. It has to be a function though then capable of decrypting the encrypted text.
Any ideas ? Again Dont have to be nothing too flash. I mean I had a go at just changing letters to different letters but the function got huge with all the replaces.
View Replies
View Related
How can i pass parameter in ASP with hide
ex : default.asp?id=9
i wanna be : default.asp but the id still follow the page
View Replies
View Related
I would like to get parameter of ASP script in URL. example : /localhost/example.asp?parameter1 . How can i to get this parameter ?
View Replies
View Related
I am trying to pass three parameters using this code in an asp page to an
xsl page. I keep getting the following error:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/account.asp, line 114
Any ideas what I am missing? Code:
View Replies
View Related
A MS-Access database table has 2 columns - UserID (unique) of number data type & UserName (text) along with some other columns.When users come to a particular page, say, AllUsers.asp, all the UserNames are displayed to him as hyperlinks. Based on the UserName
clicked by a user, the next page (to which the user will be taken to when he clicks any of the UserNames) will display more information about that particular UserName (which the user had clicked).Assume that the page where more info is displayed is named UserInfo.asp.
(Note that the info will also be retrieved from the DB table).
UserInfo.asp will also display the UserName the user had just clciked in AllUsers.asp.
Now for UserInfo.asp to retrieve data about the UserName the user has just clicked, I can make the links in AllUsers.asp pass the UserID as well as the UserName as a querystring value. Now whcih one will be more efficient - sending the UserID as the querystrinng value or sending the UserName as the querystring value?
View Replies
View Related
I can call a user document with a paramer in the IE Address bar eg:
C:Program FilesMicrosoft Visual StudioVB98docMyDocument.vbd?Parameter
I can call the Userdocument using these lines of code in ASP:
Sub Window_OnLoad
Navigate "docMyDocument.VBD"
End Sub
I have beed trying to pass it a parameter with the following syntax :
Navigate "docMyDocument.VBD?Parameter"
This does not seem to work. How do I call the userdocument in ASP with a parameter ?
View Replies
View Related
I am using Crystal v7. Main report and subreport are both based on the same stored procedure. How do I pass parameters to display the report and subreport in the Crystal viewer. I can display regular (non-sub) reports fine.
View Replies
View Related
I am using Ultradev to develop asp pages with Access database. With the help of some online friends & tutorials i am studying this. I need some help for the following. I am having 2 tables,
Table 1 with Company Name & Country Code
Table 2 with Country Code & Country Name.
When some one searches for a company, it should display me the Company Name along with the Country it belongs. Someone told me that it can be done by passing a parameter value from one recordset to another on the same page, but i dont know how to do this.
View Replies
View Related
myGetImage.asp is suppose to create a temporary file in the client side, and display in on the client web browser. myGetImage.asp needs to know the clients web browser temporary system path, in order to create the temp file. How do I get the parameter and value of clients web browser temporary system path?
View Replies
View Related
My website sends automatic emails from many (25) different places. I want to
send a second email by reading the parameters of the first one. I don't want
to have to repeat and maintain the assignment of the second email
From,To,Subject fields so I am just using an include at each point in the
code where I send an email: Code:
View Replies
View Related
If a com is being used at two diff places and it requires same number of inputs how can we pass inputs if number of inputs are not same on every page.
View Replies
View Related
Is it possible to do a quick check to see if you were refered to the page with URL parameters and if so perform an action?
View Replies
View Related
I 'd like to print out all posted parameter names and values. I'm able to print all the posted request values, but not the parameter names.
View Replies
View Related
I am trying to pass some paramters from a VBScript function to a script that writes the parameters to a text file. I have not been able to do it. Code:
View Replies
View Related
I've taken over the development of a web app written in ASP. It's not
very well coded. In the live environment it's fine, but on my local
machine it falls over whenever it tries to pass a date to a SQL Server
sproc. No idea why the person before me's been doing all this string
formatting with his dates, but anyway, the error is:
Application uses a value of the wrong type for the current operation.
The dates throughout are in mmddyyyy format, and presumably ADO
running on my local machine wants ddmmyyyy. I'm rebuilding the whole
app in C#.Net anyway so I don't think it's worth me running through
and making this jumble of code international date friendly, so my
question is, where exactly is the date format for ADO defined?
Windows? SQL Server?
View Replies
View Related
I am new to ASP.NET 2.0 and I am developing a small application which
originally consists of 2 pages. The first page displays a GridView Control
loaded with data from a sqlDataSouce. Such a GridView has a field that is a
hyperlink to the second page which is supposed to display the detail of the
record.
What I want to do is to send a QueryString Parameter to the second
page with the key to retrieve the record selected and show the information in
detail (a long description, a picture of a product, comments, price, etc.).
I have not written a single line of code (code-behind) for the first page.
How can I get the second page and send the querystring parameter?
View Replies
View Related
This works:
Server.Transfer("testimonials.asp")
This does not
Server.Transfer("testimonials.asp?somevar=yes")
View Replies
View Related
I read somewhere that server.transfer had a 2nd parameter so control and input values were 'passed' to the transferred to page, but it's giving me an error of wrong number of parameters. I have IIS5, is that the problem? or is it that it's an ASP page (not ASPX)
View Replies
View Related
I have a problem that I wasn't thinking of when I did this snapshot reporting in asp. Ok here it goes. I have a Access database that has my queries and reports.
I have some queries in access that have a parameter in them, like enter first date and enter second date to give me the range of record and total for the reports. Well, this asp that I have for doing the reporting does it server side. Code:
View Replies
View Related
I am passing a text parameter with querystring like
..asp?parameter
How do I pass a parameter which itself contains the "=" character?Eg if parameter ="a=b" then the code will interpret is as a parameter named "a" with a value "b", where as I need "a=b" being the value.
View Replies
View Related
From ASP I run a query using MIN(some_field/parameter) Now I need to pass this parameter to the query from ASP code. How do I do that?
Syntax like
MIN([some_field] / [])
does not work
View Replies
View Related
After i enter the username and password, the site show me all the relevant content. The authentication of the site is control by window.
From there i click another link go to another page, this page also require authentication.
But the authentication is made by myself and is not control by window.After i complete key in the username and password, the next page cannot receive the username and password parameter which i keyed in.
View Replies
View Related
I want to create a optional parameter in javascript function. How i create optional paramter with javascript function and how to use this function?
View Replies
View Related