Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: The Dubious Khelair Newsgroups: comp.lang.basic.visual.database Subject: Re: ADODB.Recordset inaccessible Date: Thu, 15 Sep 2011 10:55:59 +0000 (UTC) Organization: A noiseless patient Spider Lines: 42 Message-ID: References: Injection-Date: Thu, 15 Sep 2011 10:55:59 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="xyA28ahMtDnHeKo7GzhPbw"; logging-data="8853"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rMl/cNvndrKIowMfEMDPx5PTxqjjVkq4=" User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (OpenBSD/4.9 (i386)) Cancel-Lock: sha1:Ec8ctU0z0hyeEOmooI4xinXuV5Y= Xref: x330-a1.tempe.blueboxinc.net comp.lang.basic.visual.database:9 Okay; as I figured it was a problem that is seeming pretty foolish. I haven't been able to try this out yet, but I believe it sounds like a pretty plausible solution. I was under the mistaken impression that my ADODB.Recordset object was going to slurp in the entire results of my query, and that I could immediately close the ADODB.Connection object when I was done with it, being able to later peruse the Recordset object at my leisure. I've been informed that this is not the case, however. I'm not used to this environment, though; that's really something that I should've tried when debugging but I didn't even think about it. The Dubious Khelair wrote: > I am working on a project here that has me working with a > Microsoft SQL database being accessed from an ASP.NET VB page. Up to > this point I haven't had any problems connecting to the database; > however, when I attempt to access what is a valid query in the query > builder, I am not able to see my ADODB.Recordset object's properties or > methods as far as I can tell. This may well be a very foolish mistake, > as I'm relatively new at Visual Basic and ASP.NET development as a > whole. > Dim strConn, sqlTemp As String > Dim objConn, objRecSet > objConn = Server.CreateObject("ADODB.Connection") > objRecSet = Server.CreateObject("ADODB.Recordset") > > 'credentials > strConn = > objConn.Open(strConn) > > sqlTemp = "SELECT (Fname, Lname, Employed) FROM " & _ > Student_Employment" '& _ > ' "WHERE ProgramMajor = " & _ > ddlMajorSelection.SelectedItem.ToString > > Try > objRecSet = objConn.execute(sqlTemp) > objConn.close() > Catch ex As Exception > 'error running query- do something about it here > lblDebugResults.Text = "Error: " & ex.ToString > End Try