Hi,
If i understand well, you wish to use MySQL C API function in VBScript.It's not possible in this way. But why you don't wish to use ADO? Regards, Gelu _____________________________________________________ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] ----- Original Message ----- From: "Angel Moon" <[EMAIL PROTECTED]> To: "mysql (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, August 29, 2002 4:29 PM Subject: request for support with mysql_store_result() and mysql_field_count() with vbscript > general outline of situation; my office is moving away from microsoft > (resistance is NOT futile!!! go slashdot!), and establishing web-based > customer service systems. > > i'm currently establishing a customer table, that links to a contact table. > each customer will be listed once; to be the customer name and mailing > address, with an auto_increment number serving as the customer number (key > field, cnum). > > the contact table will contain specific contact names for each customer, > with specific details such as email address, phone number, extension, title, > etc. > > i currently have these tables joined on the customer number (cnum), with a > separate contact number (auto increment, key field, conum) for the contact > table. > > what i'm TRYING to figure out is this: > > i do a search within the two tables to find contacts for a customer, who has > been selected from a drop-down box. this is matched on the cnum field in > both tables. > > currently, if NO contacts exist for a client, the screen remains blank. i > want to generate an option to input contact information in this case. the > logic for this is roughly: > > if the search for cnum within contacts yields no result (empty set) then > show "do you wish to input?" screen > else > list contact info > end if > > i can't seem to get my head wrapped around the syntactual requirements for > using mysql_store_result() within vbscript. > > following is a sample of what i have so far, if it helps. can someone point > me in the right direction? > > ' Retrieve The Records into Recordset > cnumfind = "select cnum from cust_info where cname = ('" & custname & "');" > Set RS = Con.Execute(cnumfind) > cnv=rs("cnum") > > cinfodisp= "select cont_info.cnum, clname, cfname, cname, caddr1, caddr2, > ccity, cst, czip, ccountry, cphone, cext, cfax, cemail from cont_info inner > join cust_info on cust_info.cnum=cont_info.cnum where cust_info.cnum = '" & > cnv & "' and cont_info.cnum=cust_info.cnum;" > set rs2 = con.execute(cinfodisp)%> > > </b><br> > > <blockquote><blockquote><blockquote><blockquote> > <b><font size="4">Customer Search Results for</font></b><br><br> > <font color = red size = +3><b><% response.write custname %></b></font><p> > > <% > ' Loop through the Records to find all cust_info.cnum where cust_info.cname > is what was selected > > WHILE NOT RS.EOF > WHILE NOT RS2.EOF%> > <table border=2><tr><th><font color=191970><%=rs2("cfname")%><% > response.write " "%> <%=rs2("clname")%></th></tr> > <br> <tr><td width="600"><b>Address, Line 1: </b><font > color=191970><%=rs2("caddr1")%></font></tr> > <% if rs2("caddr2") > "" then %> > <tr><td width="600"><b>Address, Line 2: </b><font > color=191970><%=rs2("caddr2")%></font></tr> > <% end if %> > <tr><td width="600"><b>City: </b><font > color=191970><%=rs2("ccity")%></font> <b>ST: </b><font > color=191970><%=rs2("cst")%></font> <b>Zip:</b> <font > color=191970><%=rs2("czip")%></font></td></tr> > <tr><td width="600"><b>Phone: </b><font > color=191970><%=rs2("cphone")%></font> > <% if rs2("cext") > "" then %> > <b>Ext: </b><font color=191970><%=rs2("cext")%></font> > <% end if %> > <% if rs2("cfax") > "" then %> > <%response.write " "%> <b>Fax: </b><font > color=191970><%=rs2("cfax")%></font> > <% end if %> > <% if rs2("cemail") > "" then %> > <tr><td width="600"><b>Email: </b><i><font color=191970> <a > href=mailto:<%=rs2("cemail")%> > <%=rs2("cemail")%></a></font></i> > </td></tr> > <% end if %> > </table> > > <% > rs2.MoveNext > wend > rs.movenext > wend > > con.close > Set Con = nothing > %> > > ANY help would be GREATLY appreciated!!!! > > angel > IT Services > Trintex Corporation > 770-258-5551 > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php