Select statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello!

I am converting 2 Select statements written in VB ASP into C# ASP.NET.
Please help.

Set rsPPO = Server.CreateObject("ADODB.Recordset")
sPPO = "SELECT a.line_no, a.loc_no, a.qty_ord, a.po_no, a.unit_price,
a.tot_qty_rec, " _
& " to_char(a.last_rec_date,'mm/dd/yyyy') last_rec_date, " _
& " to_char(a.due_date,'mm/dd/yyyy') due_date, b.item_no, b.vendor_item_no,
" _
& " b.manufacturer_item_no, b.vendor_no " _
& "FROM po_line a, im_vendor_item b " _
& "WHERE b.item_no = a.item_no And b.vendor_item_no = a.vendor_item_no And
b.vendor_no = a.vendor_no" _
& " And Upper(b.manufacturer_item_no) Like Upper('" & Request("mfrpartNo")
& "%')" _
& " And Upper(b.item_no) Like Upper('" & Request("dpartNo") & "%')" _
& " And Upper(b.vendor_item_no) Like Upper('" & Request("vendPartNo") & "%')"

rsPPO.Open sPPO,db,,,adCmdText
Do While Not rsPPO.EOF
rsPPO.MoveNext
rc = rc + 1


-----------------------------------------------------------------------------------------------------

Set rsOrdNo = Server.CreateObject("ADODB.Recordset")
sOrdNo = "SELECT b.ord_no FROM po_line_dist a ,oe_line b where a.po_no ='"
& rsPPO("po_no") & "'"_
& " And a.line_no = " & rsPPO("line_no") & " And a.key_1 = b.ord_no(+) And
a.key_2 = b.line_no(+)"
'response.write (sOrdNo)
rsOrdNo.Open sOrdNo,db,,,adCmdText
 
Newbie,

From VBNet to C# is the newsgroup CSharp.

However this is a very archaic way of using DotNet, to get a better method,
you can have a look at ADONET.

Than you can post a kind of this question the best in the newsgroup Adonet,
however tell than that you want to use ADONET. (The select string will be
made in a different way for that).

Adonet
news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet

Web interface:
http://communities2.microsoft.com/c.../?dg=microsoft.public.dotnet.framework.adonet

And than you will be probably advised to use xxxParameters for your Select
statement.

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Select statement 1

Back
Top