Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] RE: Disconnected Recordset
- From: javascript@xxxxxxxxxx (Ben Joyce)
- Subject: [Javascript] RE: Disconnected Recordset
- Date: Mon, 24 Feb 2003 21:01:20 -0000
I concurr; use GetRows() to get all the lubbery data into an array and enumerate that, rather than the memeory-intesive Recordset object with all its overheads. In time you will achieve happiness and wellbeing. .b > -----Original Message----- > From: javascript-admin@xxxxxxxxxx > [mailto:javascript-admin@xxxxxxxxxx] On Behalf Of Peter Brunone > Sent: 24 February 2003 19:15 > To: javascript@xxxxxxxxxx > Subject: RE: [Javascript] RE: Disconnected Recordset > > > > I'm not sure what the magic word is for that > ActiveConnection parameter -- > I've never been much of a recordset/cursor man myself -- but > you might want > to try using the GetRows() method of the recordset to dump it > to an array... > and then just get rid of the RS entirely. > > Just a thought... > > Peter > > |-----Original Message----- > |From: javascript-admin@xxxxxxxxxx > [mailto:javascript-admin@xxxxxxxxxx]On > |Behalf Of Michael Dougherty > |Sent: Monday, February 24, 2003 12:27 PM > |To: javascript@xxxxxxxxxx > |Subject: [Javascript] RE: Disconnected Recordset > | > | > |the following works fine: > |<script type='text/javascript'> > | var oCN = new ActiveXObject("ADODB.Connection") ; > | var oRS = new ActiveXObject("ADODB.Recordset") ; > | > | oRS.CursorLocation = 3 ; /* Client-side */ > | oRS.CursorType = 3 ; /* Static */ > | oRS.LockType = 1 ; /* ReadOnly */ > | > | oCN.open ("Server=MyServer;Database=MyDB;User=Me;Pwd=MyPwd'") ; > | oRS.open ("Select * from MyTable",oCN) ; > | > | alert( oRS.recordCount ) ; > | > | oRS.close ; > | oCN.close ; > |</script> > | > |What i want to do is this: > |<script type='text/javascript'> > | var oCN = new ActiveXObject("ADODB.Connection") ; > | var oRS = new ActiveXObject("ADODB.Recordset") ; > | > | oRS.CursorLocation = 3 ; /* Client-side */ > | oRS.CursorType = 3 ; /* Static */ > | oRS.LockType = 1 ; /* ReadOnly */ > | > | oCN.open ("Server=MyServer;Database=MyDB;User=Me;Pwd=MyPwd'") ; > | oRS.open ("Select * from MyTable",oCN) ; > | > | oRS.activeConnection = [whatever it takes to disconnect > this recordset] ; > | > | oCN.close ; /* close the connection to the DB */ > | > | /* use the recordset - possibly leaving it open for a while */ > | alert( oRS.recordCount ) ; > | > | oRS.close ; > |</script> > | > | If you don't set the activeConnection to NULL before > closing the oCN > |connection object, it will cause the oRS recordset object to > also close. > | > | > |> I guess the first question would be, how did you get client-side > |>javascript to connect to a database? Once we understand > the context, > |perhaps we'll be > |>able to help more. > | > | > |_______________________________________________ > |Javascript mailing list > |Javascript@xxxxxxxxxx > |https://lists.LaTech.edu/mailman/listinfo/javascript > | > > _______________________________________________ > Javascript mailing list > Javascript@xxxxxxxxxx > https://lists.LaTech.edu/mailman/listinfo/javascript >
- References:
- [Javascript] RE: Disconnected Recordset
- From: Peter Brunone
- [Javascript] RE: Disconnected Recordset
- Prev by Date: [Javascript] RE: Disconnected Recordset
- Next by Date: [Javascript] RE: Disconnected Recordset
- Previous by thread: [Javascript] RE: Disconnected Recordset
- Next by thread: [Javascript] RE: Disconnected Recordset
- Index(es):