thank u Dan Jegatha Dan Powderhill <[EMAIL PROTECTED]> wrote: It might be the order of the fields being returned by your query.
Using SELECT * doesn't guarantee the order that the fields will be returned from the database. So where you are setting the value of the b variable to rs(0) it may not be the field you expect it to be. If you explicitely specify the order of the fields you want in your select statement then you can guarantee they'll be returned in that order. e.g. SELECT [myField1], [myField2], [myField3] FROM [myTable] Dan ________________________________ From: AspClassicAnyQuestionIsOk@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jegatha Sent: 22 August 2005 07:03 To: Asp Subject: [AspClassicAnyQuestionIsOk] problem in retrive value hi all, this is my coding. it enter into the if condition here the a value=contacts and the b value=1. but inside the table(the line highlighted) it return the b value as contacts.before it return right.i couldn't find out the problem. can anyone find out the problem? <% dim cn,rs,Projectname,bids,avergebid,jobtype,started,ending,bid,rs1,a,b set cn=server.createobject("ADODB.connection") set rs=server.createobject("ADODB.recordset") set rs1=server.createobject("ADODB.recordset") cn="DRIVER={Microsoft Access Driver (*.mdb)}; " cn=cn & "DBQ=" & Server.MapPath("/access_db/wecommerce.mdb") rs.open "select * from 3dmax",cn,1,2 rs1.open"select * from 3dmaxsubmit a,3dmax b where a.ProjectName=b.ProjectName",cn,1,2 while not rs1.eof a=rs1("ProjectName") b=cInt(rs1("hits")) rs1.movenext wend response.write a response.write b %> <p><b> Feature projects</b></p> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#ACAAA8" width="100%" id="AutoNumber1" bgcolor="#E2E1E0"> <tr> <td width="24%"><b>Project Name</b></td> <td width="16%"><b> </b></td> <td width="16%"><b>No Of Bids</b></td> <td width="17%"><b>AverageBid</b></td> <td width="17%"><b>Jobtype</b></td> <td width="17%"><b>Started</b></td> <td width="17%"><b>EndDate</b></td> </tr> <form name=frm method=post action="3dmax1.asp"> <%while not rs.eof b=rs(1)%> <input type=hidden name=hid1 value=<%=rs(0)%>> <tr> <td width="24%"><%=rs(1)%> </td> <td width="16%"> <input type=submit value="viewdetails" style="color: #000000; text-decoration: blink; background-color: #6699FF"></td> </form> <%if(rs(1)=a) then response.write rs(1) %> <td width="8%"><%response.write b%> </td> <%else%> <td width="8%"><%=rs(2)%> </td> <%end if%> <td width="9%"><%=rs(3)%> </td> <td width="25%"><%=rs(4)%> </td> <td width="17%"><%=rs(5)%> </td> <td width="17%"><%=rs(6)%> </td> </tr> <% rs.movenext wend %> </table> thanks in adv regards, Jegatha --------------------------------- Check out Yahoo! India Rakhi Special for Rakhi shopping, contests and lots more. http://in.promos.yahoo.com/rakhi/index.html [Non-text portions of this message have been removed] SPONSORED LINKS Programming languages <http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Programmin g+languages&w2=C+programming+language&w3=Computer+programming+languages& w4=Java+programming+language&w5=C+++programming+language&w6=History+of+c omputer+programming+language&c=6&s=198&.sig=hjFSMmldhVc3zrT5SqL9xQ> C programming language <http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=Programmi ng+languages&w2=C+programming+language&w3=Computer+programming+languages &w4=Java+programming+language&w5=C+++programming+language&w6=History+of+ computer+programming+language&c=6&s=198&.sig=td85HQ93XfErfw7wfLZ86A> Computer programming languages <http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=P rogramming+languages&w2=C+programming+language&w3=Computer+programming+l anguages&w4=Java+programming+language&w5=C+++programming+language&w6=His tory+of+computer+programming+language&c=6&s=198&.sig=BMtgOo7dpsC1xzn1Ygp BPg> Java programming language <http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=Progra mming+languages&w2=C+programming+language&w3=Computer+programming+langua ges&w4=Java+programming+language&w5=C+++programming+language&w6=History+ of+computer+programming+language&c=6&s=198&.sig=8IuywkhSLTtpB6_iFiJoCQ> C programming language <http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=Program ming+languages&w2=C+programming+language&w3=Computer+programming+languag es&w4=Java+programming+language&w5=C+++programming+language&w6=History+o f+computer+programming+language&c=6&s=198&.sig=jpmDiGf8qD8AqZNqFwDO7w> History of computer programming language <http://groups.yahoo.com/gads?t=ms&k=History+of+computer+programming+lan guage&w1=Programming+languages&w2=C+programming+language&w3=Computer+pro gramming+languages&w4=Java+programming+language&w5=C+++programming+langu age&w6=History+of+computer+programming+language&c=6&s=198&.sig=9slR1_vZJ lvyOINA4iLkow> ________________________________ YAHOO! GROUPS LINKS * Visit your group "AspClassicAnyQuestionIsOk <http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk> " on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . ________________________________ [Non-text portions of this message have been removed] --------------------------------- YAHOO! GROUPS LINKS Visit your group "AspClassicAnyQuestionIsOk" on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- --------------------------------- Check out Yahoo! India Rakhi Special for Rakhi shopping, contests and lots more. http://in.promos.yahoo.com/rakhi/index.html [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12haoq4ls/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124716417/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992 ">Fair play? Video games influencing politics. Click and talk back!</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/