shanuragu
06-18-2003, 08:14 AM
Hi
What is wrong with the following sql operations
Set Con = Server.CreateObject("adodb.connection")
Set RsCdPrice = Server.CreateObject("adodb.recordset")
Con.open "lila"
cost=0
shipchrg=0
For i=0 To UBound(a)
'strsql = "SELECT cp.*, ct.* from CdPrice cp, CdTitles ct Where cp.CdTitleId=ct.CdTitleId And cp.CountryId="&ConId&" And cp.CdTitleId="&a(i)&""
strsql = "Select cp.*, ct.*" & _
" FROM CdPrice as cp, CdTitles as ct" & _
" WHERE ((cp.CdTitleId=ct.CdTitleId)" & _
" And cp.CountryId="&ConId&" And cp.CdTitleId="&a(i)&")"
Response.write("query" & strsql & "<br>")
RsCdPrice.Open strsql, Con,adlockoptimistic,, adCmdText
Next
I am getting the following error,
Error Type:
ADODB.Recordset (0x800A0E79)
Operation is not allowed when the object is open.
/lila/asp/orderdetails.asp, line 81
What could be the reason???
Please help:confused: :(
ShaRa
What is wrong with the following sql operations
Set Con = Server.CreateObject("adodb.connection")
Set RsCdPrice = Server.CreateObject("adodb.recordset")
Con.open "lila"
cost=0
shipchrg=0
For i=0 To UBound(a)
'strsql = "SELECT cp.*, ct.* from CdPrice cp, CdTitles ct Where cp.CdTitleId=ct.CdTitleId And cp.CountryId="&ConId&" And cp.CdTitleId="&a(i)&""
strsql = "Select cp.*, ct.*" & _
" FROM CdPrice as cp, CdTitles as ct" & _
" WHERE ((cp.CdTitleId=ct.CdTitleId)" & _
" And cp.CountryId="&ConId&" And cp.CdTitleId="&a(i)&")"
Response.write("query" & strsql & "<br>")
RsCdPrice.Open strsql, Con,adlockoptimistic,, adCmdText
Next
I am getting the following error,
Error Type:
ADODB.Recordset (0x800A0E79)
Operation is not allowed when the object is open.
/lila/asp/orderdetails.asp, line 81
What could be the reason???
Please help:confused: :(
ShaRa