recordset

Changing cursor type with stored procedure in ASP

Using ASP, I want to call a stored procedure that returns a recordcount. I understand that I have to change the cursor type to adOpenKeyset or adOpenStatic to return a recordcount. What I don't understand is how to modify my vbscript so that it changes the cursor type when calling the procedure. currently I say cm.commandtype = adCmdS...

Generate a Crystal Reports TTX file from an ADODB.Recordset

Is there an API call for Crystal Reports 8.5 that will generate a TTX schema file from a VB6 ADODB.Recordset at runtime, much in the same way you can generate an XSD from a DataSet in .NET? I could roll my own, and I think I probably will have to, but I don't want to reinvent the wheel because I missed something obvious. ...

Java Programming - Spring and JDBCTemplate - Use query, queryForList or queryForRowSet?

My Java (JDK6) project uses Spring and JDBCTemplate for all its database access. We recently upgraded from Spring 2.5 to Spring 3 (RC1). The project does not use an ORM like Hibernate nor EJB. If I need to read a bunch of records, and do some internal processing with them, it seems like there are several (overloaded) methods: query, que...

Retrieve ADO Recordset Field names (Classic ASP)

Hi all, I wonder if someone can help: Long story short, I'm using MSSQL2005 to build a Pivot table. The data being examined is limited by date range (All data for 1 week from the nearest Monday to the date selected) When I run the Stored Proc and pass it a date, I get The correct table back eg: Time | 1 Jan 09 | 2 Jan 09 | ...

Deleting rows from a table using a loop

Why does my Do Until loop try to run raw.Delete even though raw.EOF is true? If I have an empty table, this crashes. Why? Dim raw As Recordset Set raw = db.OpenRecordset("tblSampleRaw") If raw.RecordCount > 0 Then raw.MoveFirst Do Until raw.EOF raw.MoveFirst raw.Delete Loop End If ...

MS Access 2003 - VBA for SELECT query and only choosing specfic record for form

Okay so on this form, I create a grid, almost looks like a bar chart with little "cells" stacked by month. Each of these "cells" are square sub forms, and I create the little square forms that I use as the sub forms. So what I wanted to know is, what is the code (VB) for running a select query, and only working with specific records wit...

Trouble creating a recordset from a SQL Server 2005 query with PIVOT

Here's the output code from my stored proc: SELECT * FROM ( select q.ccypair, q.vega, t.label from #parallel q LEFT JOIN TPRR_vega_weights t ON q.Tenor = t.Tenor ) a PIVOT ( Sum(Vega) for a.label in ([t1],[t2],[t3],[t4],[t5],[t6],[t7],[t8],[t9],[t10],[t11],[t12],[t13],[t14],[t15],[t16],[t17],[t18]) )p order b...

Using NOT LIKE in Filter property of VBA recordset

I am using excel 2003 to connect to SYBASE database using VBA recordset. I want to filter the records. Following is code I have used. Dim rset As New ADODB.Recordset rset.Open sQuery, m_db, adOpenForwardOnly rset.Filter = "Name NOT LIKE 'Dav%'" rset.Requery But it is not working and returning all rows. If I use Name LIKE 'Dav%', its ...

Stored procedure does not return data if executed from VBA

I had stored procedure MySPOld in Sybase db. I created new sp MySP. This new sp returns data while executed from Sybase Sql Advantage. But not returning the data when called from VBA - Excel 2003 (EOF property of recordset is True). Here is my code.. Dim dbCon As ADODB.Connection Dim rstTemp As New ADODB.Recordset Dim query As String qu...

Run a SQL query on existing recordset?

I've created a 3rd recordset (disconnected) from two existing recordsets that came from different connections. Now, I'd like to run a SQL query on this 3rd recordset. I am using Excel VBA. thanks, Harry ...

Create a field name from a recordset

I have a form that displays information on a project that has 10 check boxes. The check boxes are named "chkAudience1", "chkAudience2", etc through "chkAudience10". Any combination of boxes can be checked from none to all and anything in between. Then I have a table that links the check boxes to the project. This table contains a field ...

ADODB recordset in VBA says excel field is empty when it's not

I have an excel sheet I need to import in my Access database. The sheet looks like this: DATE RECEPTION DENOMINATION ITEM N° QUANTITE RECUE 06/01/2010 DVD-Sex ...

mysql - get results at mysql prompt, but not through script?

I'm using php to fetch some records from my db and it keeps returning "No results found". But, when I print the query to the screen and copy and paste it at the mysql prompt, I get 1 row. Granted, it's a monster query, but shouldn't I get the same results? What causes that to happen? Any suggestions on what to check? Don't know if...

Reducing the recordset where a particular field has similar data. (MySQL)

I have two tables, 'discussion' and 'discussion_responses'. A unique ID from 'discussion' is used in 'discussion_responses' to identify the response to the original post in a forum. I created the following query to extract the posts that have NEW replies, but are NOT linked to new topics. Both tables have a field for the date added and '...

Is ODBC from MARS but ADO/OLEDB from VENUS?

Short question: I am finding I need to use MARS over ODBC but not over ADO/OLEDB, is that correct? Longer explanation: I just discovered my ODBC code (using "Driver={SQL Native Client}", MFC CDatabase code) needs to have MARS ("MARS_Connection=yes;") because, although I do not issue multiple SELECTs when opening a RecordSet, I do fetch...

How to prevent TADORecordset from scrolling?

I would like to prevent scrolling of ADORecordset basing on some condition. For example it would be convenient to do something like that: procedure TfrmMain.qryCenyBeforeScroll(DataSet: TDataSet); begin if not (condition) then qryCeny.DoNotScroll; //Just the idea end; How to do this? ...

Generating an ADODB recordset programatically

I am attempting to generate an ADO RecordSet programatically within .Net. This will be passed on to existing legacy code in VB6 which is already expecting a ADO RecordSet, I do not wish to change the existing code. I was successful in defining fields within a new RecordSet ADODB.Recordset rs = new Recordset(); rs.Fields.App...

Performance of passing data between .Net and COM assemblies

I am in the process of migrating a legacy VB6 app to .Net, however since it is a high-profile business critical application, it is being done piece by piece. In the interest of improving performance, there is one method which gets hit a lot,thousands of times during the application life, and I was wanting to rewrite it in .Net (C#) to s...

How should Iterator implementation deal with checked exceptions?

I'm wrapping a java.sql.RecordSet inside a java.util.Iterator. My question is, what should I do in case any recordset method throws an SQLException? The java.util.Iterator javadoc explains which exceptions to throw in various situations (i.e. NoSuchElementException in case you call next() beyond the last element) However, it doesn't m...

Adding byte to the recordset works, adding same to a stream does not

A file is submitted, that file is put into a blob in a database (.AppendChunk), and that file should also emailed. What I want to do is: File is parsed from the form data into a variable (done). Variable is inserted into database (rs(key).AppendChunk var) (done). That variable is attached to an email (failing). However, if I read back w...