473,394 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Select statements

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

Nov 21 '05 #1
1 949
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/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet

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

I hope this helps?

Cor
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hans Maurer | last post by:
>Description: We're running our current TTS application with MySQL (on Unix). All database, table and column names are in lower-case. However, we need to access this database with a new...
1
by: alexqa2003 | last post by:
got a table with (class, name, exam, score) fields. To find max(score) for exam that starts with letter 'm' grouped by class and name,did: select max(score) from #temp where exam like 'm%'...
3
by: Leader | last post by:
Hi All, I am getting slower performance of select statements in MS SQL. I am finding select statements in MS SQL are even slower than MS ACCESS. Is there any way to improve the performance of...
2
by: Edwinah63 | last post by:
Hi Everyone, All the very best for 2004!! i need urgent help with this problem, the users are about to skin me alive!! we have an access front end with linked to sql server 2k tables. ...
15
by: grunar | last post by:
After some thought on what I need in a Python ORM (multiple primary keys, complex joins, case statements etc.), and after having built these libraries for other un-named languages, I decided to...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
4
by: Ed L. | last post by:
I think I'm seeing table-level lock contention in the following function when I have many different concurrent callers, each with mutually distinct values for $1. Is there a way to reimplement...
2
by: =?Utf-8?B?VGVycnk=?= | last post by:
I have coded multiple select statements in a single stored procedure, and when I execute this procedure on SQL Server Management Express, I correctly get multiple result sets. But, if I try to add...
5
by: sijugeo | last post by:
Hi, I am using SQL SERVER 2005. I have two select statements. The code is given below. -----------1.-------------------------- select d.idx_Delivery,s.idx_Stops,case FixedFlag when 1...
1
by: bharathi228 | last post by:
How to write two or more select statements in a single query here my requirement is SELECT dbo.SYS_PARAMS.PARAMETER_NAME, dbo.SYS_PARAMS.PARAMETER_UNITS, SYSTEM2.dbo.CALIBRATION.CAL_TYPE, ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.