Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conversion problem

Status
Not open for further replies.

taval

Programmer
Jul 19, 2000
192
GB
I have a query like:<br><br>-----------------<br><br>StrQuery = &quot;Select * from Customer where CustID = &quot; & Cint(Request(&quot;CustID&quot;))& &quot;&quot;<br><br>---------------------<br><br>This works perfectly and takes the numeric value off the text box on HTML.<br><br>My problem is I have a numeric field called &quot;CustID&quot;, when I try and do the same query using <br><br>----------------------<br><br>StrQuery = &quot;Select * from Customer where CustID = &quot; & Cint(rs(&quot;CustID&quot;))& &quot;&quot;<br><br>OR <br><br>StrQuery = &quot;Select * from Customer where CustID = &quot; rs(&quot;CustID&quot;)& &quot;&quot;<br><br>-------------------------<br><br>I get an error, this time I'am getting the numeric value through another recordset named &quot;rs&quot;. Do I have to convert the field into a number? if so how do I do that if I haven't done it already? whats wrong?<br><br>grateful for any help, :]<br>
 
If you could only provide the error description - it would be more clear what the problem is. The problem may be in that you're trying to convert to integer actual value of recordset's field, which is already an integer&nbsp;&nbsp;<br><br>
 
Secondly, get rid of this part of your string:<br>& &quot;&quot; - it could add a null-string to the value of <br>rs(&quot;CustID&quot;),and CustID with this value doesn't exist.
 
Dear taval,<br><br>When a query is failing in ASP you should output the SQL Statement you are using to the browser. Then copy the text from the browser into your database environment and execute it there. Your database should tell you what the problem is.<br><br>Good luck<br>-pete
 
I think the error it comes up with is an exception error, if CustID is an integer then surely I would just have to do:<br><br>StrQuery = &quot;Select * from Customer where CustID = &quot; & rs(&quot;CustID&quot;)& &quot;&quot;<br><br>Any other suggestions?<br>
 
tavel,<br><br>print out the error, so we know what it is. In your code, do:<br><br>On Error Resume Next<br>'do the db statement<br>Response.write Err.Number & Err.Description
 
First,I still don't know what do you need this appendix(& &quot;&quot;) to your code for?<br>Second,why don't you tell us what error you're getting?<br>Is it confidential?
 
ok people I now got the error message that pops up, is says:<br><br>-----------------------<br>error '80020009'<br>Exception occurred.<br>line 95<br>------------------------<br><br>and my code looks like this:<br><br>------------------------------------------<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Database Test&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;% <br>Dim rs<br>Dim StrQuery<br>Dim strAction<br>Dim strSQL<br><br>strAction = Request.Form(&quot;CustQuery&quot;)<br><br>Select Case strAction<br><br>Case &quot;CustID&quot;<br><br>StrQuery = &quot;Select * from Customer where CustID = &quot; & Cint(Request(&quot;SQLvariable&quot;))& &quot;&quot;<br><br>Case &quot;CustName&quot;<br><br>StrQuery = &quot;Select * from Customer where CustName = &quot; & &quot;'&quot; & Request(&quot;SQLvariable&quot;)& &quot;'&quot;<br><br>Case &quot;CustEmail&quot;<br><br>StrQuery = Request(&quot;SQLvariable&quot;)<br><br>Case &quot;List All Customers&quot;<br><br>StrQuery = &quot;Select * from Customer&quot;<br>Set rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br>rs.Open StrQuery ,&quot;DSN=Architron; UID=sa; PWD=&quot;<br><br>rs.MoveFirst<br><br>%&gt;<br>&lt;table cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; BORDER=&quot;0&quot; WIDTH=&quot;850&quot; &gt;<br>&lt;tr&gt;&lt;td align= &quot;center&quot; width=&quot;70&quot; bgcolor=#CCCCCC &gt;Customer ID&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;150&quot; bgcolor=#CCCCCC &gt;Customer Name&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;Phone&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;Fax&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;150&quot; bgcolor=#CCCCCC &gt;E-mail&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;110&quot; bgcolor=#CCCCCC &gt;Space Allocated (MB)&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;60&quot; bgcolor=#CCCCCC &gt;Space Used&lt;/td&gt;&lt;/tr&gt;<br>&lt;%<br><br>While Not rs.EOF %&gt;<br>&lt;TR&gt;&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;CustID&quot;) %&gt;&lt;/TD&gt; <br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;CustName&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt; <br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;Phone&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;Fax&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;email&quot;) %&gt;&lt;/TD&gt; <br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;SpaceAllocationInMB&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;SpaceUsed&quot;)%&gt;&lt;/TD&gt;&lt;/TR&gt; <br>&lt;%<br>rs.MoveNext<br>Wend %&gt;<br><br>&lt;/Table&gt;<br>&lt;% <br><br>Response.End <br><br>End select<br><br>Set rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br>rs.Open StrQuery ,&quot;DSN=Architron; UID=sa; PWD=&quot;<br><br>if Not rs.EOF then<br><br>Do While Not rs.EOF <br>%&gt;<br>&lt;Table align=&quot;center&quot; WIDTH=&quot;800&quot;&gt;<br>&lt;TD align=&quot;right&quot; bgcolor=#CCCCCC WIDTH=&quot;160&quot;&gt;&lt;% Response.Write &quot;Customer ID:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot;& rs(&quot;CustID&quot;) %&gt;&lt;/TD&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Customer Name:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;CustName&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Address:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address1&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address2&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address3&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address4&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address5&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;PostCode:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;PostCode&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Phone:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Phone&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Fax:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Fax&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;E-mail:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;email&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Can Upload:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;CanUpload&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Can Download:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;CanDownLoad&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Space Allocated (MB) :&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;SpaceAllocationInMB&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Space Used:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;SpaceUsed&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;/Table&gt;<br>&lt;%<br>Response.Write &quot;&lt;br&gt;&quot;<br>rs.MoveNext<br>Loop<br><br>strSQL = &quot;Select * from FileDescription where CustId =&nbsp;&nbsp;&quot; & rs(&quot;CustID&quot;)<br><br>Set rsFileDesc = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br>rsFileDesc.Open strSQL ,&quot;DSN=Architron; UID=sa; PWD=&quot;<br><br>if rsFileDesc.eof then<br>response.write &quot;&lt;h2&gt; User owns no files &lt;/h2&gt;&quot;<br>else<br>rsFileDesc.MoveFirst<br><br>%&gt;<br>&lt;table align= &quot;center&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; BORDER=&quot;0&quot; WIDTH=&quot;800&quot; &gt;<br>&lt;tr&gt;&lt;td align= &quot;center&quot; width=&quot;70&quot; bgcolor=#CCCCCC &gt;File ID&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;150&quot; bgcolor=#CCCCCC &gt;File Name&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;File Size&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;Last Modified&lt;/td&gt;&lt;/tr&gt;<br>&lt;%<br><br>While not rsFileDesc.EOF %&gt;<br>&lt;tr&gt;&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;FileID&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;FileName&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;Size&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;LastModified&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;%<br>rsFileDesc.MoveNext <br>wend %&gt;<br><br>&lt;/Table&gt;<br>&lt;% <br><br>end if<br><br><br><br>else<br>&nbsp;&nbsp;Response.write &quot; No Match Record Found&quot; & &quot;&lt;br&gt;&quot;<br>end if<br><br>rs.Close<br>rsFileDesc.Close<br>Set rs = Nothing<br>Set rsFileDesc = Nothing %&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br>-----------------------------------------------------------<br><br>line 95 is the line that reads<br>&quot;strSQL = &quot;Select * from FileDescription where CustId =&nbsp;&nbsp;&quot; & rs(&quot;CustID&quot;)&quot;<br><br>Grateful for any help.<br>
 
try to copy and paste this code to your page or compare it against the code that you have to see the changes. I hope that'll help.<br><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Database Test&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;% <br>Dim rs<br>Dim StrQuery<br>Dim strAction<br>Dim strSQL<br><br>strAction = Request.Form(&quot;CustQuery&quot;)<br><br>Select Case strAction<br><br>Case &quot;CustID&quot;<br><br>StrQuery = &quot;Select * from Customer where CustID = &quot; & Cint(Request(&quot;SQLvariable&quot;))& &quot;&quot;<br><br>Case &quot;CustName&quot;<br><br>StrQuery = &quot;Select * from Customer where CustName = &quot; & &quot;'&quot; & Request(&quot;SQLvariable&quot;)& &quot;'&quot;<br><br>Case &quot;CustEmail&quot;<br><br>StrQuery = Request(&quot;SQLvariable&quot;)<br><br>Case &quot;List All Customers&quot;<br><br>StrQuery = &quot;Select * from Customer&quot;<br>Set rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br>rs.Open StrQuery ,&quot;DSN=Architron; UID=sa; PWD=&quot;<br><br>rs.MoveFirst<br><br>%&gt;<br>&lt;table cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; BORDER=&quot;0&quot; WIDTH=&quot;850&quot; &gt;<br>&lt;tr&gt;&lt;td align= &quot;center&quot; width=&quot;70&quot; bgcolor=#CCCCCC &gt;Customer ID&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;150&quot; bgcolor=#CCCCCC &gt;Customer Name&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;Phone&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;Fax&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;150&quot; bgcolor=#CCCCCC &gt;E-mail&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;110&quot; bgcolor=#CCCCCC &gt;Space Allocated (MB)&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;60&quot; bgcolor=#CCCCCC &gt;Space Used&lt;/td&gt;&lt;/tr&gt;<br>&lt;%<br><br>While Not rs.EOF %&gt;<br>&lt;TR&gt;&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;CustID&quot;) %&gt;&lt;/TD&gt; <br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;CustName&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt; <br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;Phone&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;Fax&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;email&quot;) %&gt;&lt;/TD&gt; <br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;SpaceAllocationInMB&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt;&nbsp;&nbsp;&lt;% Response.Write rs(&quot;SpaceUsed&quot;)%&gt;&lt;/TD&gt;&lt;/TR&gt; <br>&lt;%<br>rs.MoveNext<br>Wend %&gt;<br><br>&lt;/Table&gt;<br>&lt;% <br><br>Response.End <br><br>End select<br><br>Set rs = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br>rs.Open StrQuery ,&quot;DSN=Architron; UID=sa; PWD=&quot;<br><br>if Not rs.EOF then<br><br>Do While Not rs.EOF <br>%&gt;<br>&lt;Table align=&quot;center&quot; WIDTH=&quot;800&quot;&gt;<br>&lt;TD align=&quot;right&quot; bgcolor=#CCCCCC WIDTH=&quot;160&quot;&gt;&lt;% Response.Write &quot;Customer ID:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot;& rs(&quot;CustID&quot;) %&gt;&lt;/TD&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Customer Name:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;CustName&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Address:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address1&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address2&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address3&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address4&quot;)&nbsp;&nbsp;%&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Address5&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;PostCode:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;PostCode&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Phone:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Phone&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Fax:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;Fax&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;E-mail:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;email&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Can Upload:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;CanUpload&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Can Download:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;CanDownLoad&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Space Allocated (MB) :&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;SpaceAllocationInMB&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;TR&gt;&lt;TD &gt;&lt;% Response.Write &quot;Space Used:&quot; & &quot;&lt;/TD&gt;&quot;&&quot;&lt;TD BGCOLOR=#FFFFCC&gt;&quot; & rs(&quot;SpaceUsed&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;/Table&gt;<br>&lt;%<br>Response.Write &quot;&lt;br&gt;&quot;<br>rs.MoveNext<br>Loop<br><br>%&gt;<br>&lt;table align= &quot;center&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; BORDER=&quot;0&quot; WIDTH=&quot;800&quot; &gt;<br>&lt;tr&gt;&lt;td align= &quot;center&quot; width=&quot;70&quot; bgcolor=#CCCCCC &gt;File ID&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;150&quot; bgcolor=#CCCCCC &gt;File Name&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;File Size&lt;/td&gt;<br>&lt;td align= &quot;center&quot; width=&quot;120&quot; bgcolor=#CCCCCC &gt;Last Modified&lt;/td&gt;&lt;/tr&gt;<br><br>&lt;%strSQL = &quot;Select * from FileDescription where CustId =&nbsp;&nbsp;&quot; & rs(&quot;CustID&quot;)<br>Set rsFileDesc = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br><br>do while not rs.eof<br><br>rsFileDesc.Open strSQL ,&quot;DSN=Architron; UID=sa; PWD=&quot;<br><br>if rsFileDesc.eof then<br>response.write &quot;&lt;h2&gt; User owns no files &lt;/h2&gt;&quot;<br>else<br>rsFileDesc.MoveFirst<br><br>While not rsFileDesc.EOF %&gt;<br>&lt;tr&gt;&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;FileID&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;FileName&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;Size&quot;) %&gt;&lt;/TD&gt;<br>&lt;TD align= &quot;center&quot; BGCOLOR=&quot;#99FF99&quot;&gt; &lt;% Response.write rsFileDesc(&quot;LastModified&quot;) %&gt;&lt;/TD&gt;&lt;/TR&gt;<br>&lt;%<br>rsFileDesc.MoveNext <br>wend <br>rs.movenext<br>loop%&gt;<br><br>&lt;/Table&gt;<br>&lt;% <br><br>end if<br><br><br><br>else<br>&nbsp;&nbsp;Response.write &quot; No Match Record Found&quot; & &quot;&lt;br&gt;&quot;<br>end if<br><br>rs.Close<br>rsFileDesc.Close<br>Set rs = Nothing<br>Set rsFileDesc = Nothing %&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;
 
I'm sorry, missed one line:<br>&lt;%strSQL = &quot;Select * from FileDescription where CustId =&nbsp;&nbsp;&quot; & rs(&quot;CustID&quot;)<br>Set rsFileDesc = Server.CreateObject (&quot;ADODB.Recordset&quot;)<br><br><b><font color=red>rs.movefirst</font></b><br>do while not rs.eof<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top