Comparing Two Record Sets
how can i compare 2 record sets. In one RS i have excel file and other RS i have SQL server and when i get the results from both i want to compare them as one of you guys suggested me to write a loop that cycles through the record sets Comparing any fields.
View Replies
ADVERTISEMENT
What would be the most efficient way to check to see if a cookie matches a record in a DB table?
If the user's cookie matches a record in a table of executives, then I want to display a breadcrumb menu item just for that executive.
This does not have to be super-secure or anything, I just want to keep honest people honest.
If the information they submit in a cookie is also present in a table of executives, then I want them to see a comprehensive menu set. If they are not in the table, then I want them to see a reduced menu set.
How to go about comparing a cookie with multiple values or keys with a record in a table?
View Replies
View Related
Is there a way for me to determing if a column exists in the table? ex. I
have RS("var"), where RS is a recordset. My code is dynamic but some tables
will have "var" while some won't.
View Replies
View Related
Is it possible to have an ASP form where there are 2 form fields, each mapped to a separate Access Table? Say for example
Dim rsOne
Dim rsTwo
rsOne mapped to tblOne in Access File Mydb.mdb
rsTwo mapped to tblTwo in Access File Mydb.mdb
View Replies
View Related
im a passing 3 fields from a form to use a search criteria against an access database table, i have set the fields a numeric values, what should i use to allow all records to be shown for a invidual value rather than a selected value.
Ie the form would pass
Location_id as 22
so the result page would see Request.form("Location_id")
sql would then see
where location_id = var1
var = 22
but i want to get the sql to say
where location_id >=0
what do i need to do
View Replies
View Related
I have taken over a website that was done in Frontpage and I am trying to move away from it. I am having problems with page 1 where I have a link that passes a single value to page 2 in the query string.
On page 2 I want to use that value in the query string to produce mulitple record sets. This actually works when using the fpblib.inc. Is there a way of doing this without having to use Frontpage coding.
View Replies
View Related
I am fimliar with asp javascript and not asp VB.
i can display the results ok, but if i return 100 records from my table i would like it to display 5 records per page. i have looked at asp recordset paging on several sites, however cannot find any scripts that work with ASP JAVASCRIPT....
View Replies
View Related
i want to left join result sets together coming from two different databases based on a common field storenumber. They are separate databases as per management design.
Basically it should match rows based on the store number, those who don't have matches should display only the storenumber and no other info like: Code:
Store Q1 Q2 Q3 Q4
1 x x x x
2 x x x x
3 <--No data in 3, just display storenumber
4 x x x x
View Replies
View Related
Before I created this thread, I've searched Google and used the search feature of this forum numerous times on how to do this, but couldn't find much.
Basically, I'm trying to pass multiple sets of values from the search form to the ASP into an SQL statement (Access Database).
I can only make it display different prices of a certain music type, eg all prices of rock. But it doesn't output all types of music for certain prices, eg viewing Classic and Rock records with prices of 8.99 and 10.99 only.
I've used the REPLACE command I've found and got around that problem of syntax with numeric/alpha data. Code:
View Replies
View Related
How can I replace 1 set of double quotes (") with 2 sets ("")
I tried this but it didn't work: myText = replace(myText,""","""")
View Replies
View Related
I'm a little perplexed. <%@Codepage="65001" %> changes how IIS/ASP will handle interpreting query string variables - i.e. it will read the querystring as being utf-8 encoded.
However, I'm finding that it *doesn't* change how Response.Cookies or
Request.Cookies get read/written.
I've been testing with a little jscript asp page with the lines
if (String (Request.QueryString ("abc")) != "undefined")
Response.Cookies("abc") = Request.QueryString ("abc");
Response.Write (Request.QueryString ("abc"));
to take a value from the query string and pass it back out as a cookie. The test value I was using was r%c3%a9sume (resume with an accented e). When the code page is set to utf-8, it will properly interpret the urlencoded query as a utf-8 string. It will output the right bytes with Response.Write.
But watching the headers produced by the request, it comes out encoded in latin-1.
Set-Cookie: abc=r%E9sume; path=/
I checked the cookie rfc on w3c.org, and oddly it doesn't say much about how to encode/interpret cookie NAME=VALUEs. The only comment on character set in the spec is that a cookie *comment* has to be utf-8 encoded.
I couldn't find anything on the MSDN documentation that addressed cookie character sets either.
View Replies
View Related
I have an ASP page that displays data from a SQL database. It includes some Canadian names/address which contain the special accent characters...my ASP page doesn't display them properly. I have included the tag
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
but they don't show up correctly...what else do I need?
Update: Turns out the source of our data gave us the old IBM codes, not the newer codes...for example, they gave us 144 instead of 201, and using the charset of 8859-1 won't allow 144 to be displayed. When replaced with 201, the character displays just fine.
View Replies
View Related
I'm working on a project, trying to create an HR hiring intranet page. Basically, here is problem. I have a table in a database called "Title Access" that lists titles, and has software, email, and user rights associated with each title. For example, Network Administrator will get Office, Dreamweaver, be part of the IT and Admin groups.
Now, here is the issue: Whenever the user types in the name, pay rate, hire date, and title on the intranet page then clicks "submit", I want the database to create a new user in the "employee" table with that name, and populate the access rights in that table with the rights associated with the title. Thus, the "employee" table will now include "John Doe", and will have Office, Dreamweaver, IT, Admin checked off. Is there any way to do this????????????
View Replies
View Related
I have an array, let's say: a(test1, test2, test3). test1 = 1, test2 = 3, test3 = 4.
I have a for loop:
for z= 0 to 2
if a(z) > 0 then (what I am trying to do is if test1 > 0 then do ...)
somecode
end if;
next
Could anyone let me what is wrong with my if statement? The code inside the if statement does not executed.
View Replies
View Related
let.... the strings are
a="234.5;678.3 "
b="678.3 "
on comparing this two i want to get 0 if the b value dosnt exist in a must return 1 .
View Replies
View Related
i am having a problem with comparing two strings. I am taking
in the parameter rs("Company") and if this is empty i want to put some
text in there. I am testing it with an empty Company field and comparing
it like so:
temp1=rs("Company")
temp2=StrComp(temp1,NULL)
I have also tried it with
temp2=StrComp(temp1,"")
but each time i get nothing returned. Is there some rule about comparing a
string with an empty string?
View Replies
View Related
I have an expiry date stored as a text field in the
following way "2003-08-23" (this gets round the US/UK
date prob)
The problem is I want to be able to show a Renew option
on the page FROM 30 days prior to that date. And then of
course if they don't renew, it unsubscribes them.
Question, how can I compare this date to see if todays
date is 30 days or closer to the expiry date?
View Replies
View Related
Is there a way to do the following select (like in Dlookup?)
SELECT Permit_No FROM Table1 WHERE Table1.Address like Table2.Address
I want to get Permit_No from table1, but its WHERE condition depends on comparing two address fields in different tables. Will that work?
View Replies
View Related
I have this page with a drop down box which loads the itemnumbers dynamically. However, I want it to NOT load the numbers that already exist in the weborderlist. What can I do to my SQL statement to make this work?
Code:
SELECT (SELECT img_inv.item_num from img_inv, weborderlist WHERE img_inv.item_num <> weborderlist.item_num and weborderlist.orderid= '1') as test
View Replies
View Related
how can i redirect a user when its 2 days before New Years, based on Date().
View Replies
View Related
How do I compare the contents of two tables, to see what doesn't exist in the one table?
Something like "select company.name, company_scores.company_name from
company, company_scores where company.name not in
company_scores.company_name" ?
View Replies
View Related
Need to do a search engine to search through a bunch of static pages (html)). so uing asp. but the page is in chinese, so how do i scan each and every html file and search for the chinese word?
View Replies
View Related
I have the following code with me Code:
<%
rs=Server.CreateObject("ADODB.recordset");
rs1=Server.CreateObject("ADODB.recordset");
sql="select coi_index_number,status,mkt_id_swno_0,mkt_id_swno_ 1,mkt_id_swno_2,mkt_id_swno_3,mkt_id_swno_4,mkt_id _swno_5,mkt_id_swno_6,mkt_id_swno_7,circle,name_of _msc from coi where coi_index_number='"+p2+"'";
sql1="select coi_index_number,status,mkt_id_swno_0,mkt_id_swno_ 1,mkt_id_swno_2,mkt_id_swno_3,mkt_id_swno_4,mkt_id _swno_5,mkt_id_swno_6,mkt_id_swno_7,circle,name_of _msc from coi1 where coi_index_number='"+p2+"'";
%>
Now i need to compare these two above mentioned recordsets....and want to pop up an alert box on the client side.....sayin whether they are same or no.
View Replies
View Related
I have a simple html/asp form that submits data to an access DB. The idea is when calling a record back from the db, the page will have an option to change certain fields (drop down) then a new submit option. My question at this point would be what logic or commands would I use to compare the original data in the fields to what's being submitted.
I ultimately want to preserve the original records and somehow append data that changes only. I'll need to eventually call a record and see all the changes/updates made. Someone mentioned I would prob need a couple of tables with a link (relationship) but is it possible to dynamically create fields as changes are made?
View Replies
View Related
basically the first array holds all the text_ids for the table text and the second array holds all the text_ids on a table join. What i mean is i have joined two tables text and text_section and it lists all the textids in the section.
i need to return a list of the textids that are not listed in the section so i need a way of comparing the two arrays and pulling out the ids that appear in array1 and not array 2 .
View Replies
View Related
I have ASP code to compare an input date and the current date. If the input date is less than today, it should give an error message. It does do this, except it doesn't consider the year, only the month and day. If I input 7/12/2004, it will not catch the discrepancy, but if I input 2/3/2005, it will. Here is the code...
SDate=FormatDateTime(Request.QueryString ("PickupDate"), 2)
FDate=FormatDateTime(Date(), 2)
If (SDate<=FDate) then
msg="You must enter a date greater than today."
Response.Write("<b><font color=red>"& msg & "</b></font><BR>")
Exit Sub
End If
View Replies
View Related
Comparing dates ?!? I having fun with dates, NOT….. I have a place where I need to compare 2 dates. Even though they are the same they will not be compared as the same in an IF statement.
Donw is a # of the day of the month, IE: 26 that is pulled from a data base. The goal is to compare dats like this :
IF ( donw ) = day(now) then
----Red stament Do this Bla Bla----
Elseif (donw ) = day(now) – 1 then
----Yellow stament Do this Bla Bla----
Elseif (donw) < day(now) then
----Green stament Do this Bla Bla----
end if
View Replies
View Related
Is there any way to compare a set of varibles to find the one that contains the biggest number? and also the one that contains the 2nd biggest.
View Replies
View Related
I need to compare the actual time on my server to the value I'm receiving on a database.
For example, let's say the actual time is 1:45 PM and the value in the database is 11:52 AM. I need to compare that if the actual time is after the one on the database, it returns a true value, if not returns a false value.
I tried this ASP code, bit it didn't worked, any ideas? Code:
View Replies
View Related
Is it possible to compare two .mdb files? I would like to find dupicates in two tables in two different .mdb files.
View Replies
View Related
I have this code Code:
varDate = Date()
SQL="SELECT id,name,eventtype,location,fromdate,todate FROM events WHERE publish='1' and fromDate > "& varDate &" ORDER BY fromdate asc"
fromDate is a Date/Time field in access. What i want to do is pick out any data which has a fromDate which is greater than today but the sql command isnt picking out any data. does anyone know how i could change my script to work.
View Replies
View Related
I'm getting this error message: Error Type:
Microsoft JET Database Engine (0x80004005)
You cannot add or change a record because a related record is required in table 'employees'. Code:
View Replies
View Related
I have a two tables in my database with a username column in both of them, i am trying to build an SQL query to return only the usernames that are not listed in both of the tables.
Any ideas?
View Replies
View Related