recordset

Something like cursor or recordset iterator in Hibernate or JPA?

☆樱花仙子☆ 提交于 2019-12-12 02:12:15
问题 Are there any means to work with long query results in Hibernate? What if I want to draw table with million of records and allow user to navigate over it? The goal is not to transfer all data to client at the time and handle the current position. 回答1: You can use simple mechanism of FirstResult and MaxResults in a Query object. query.setFirstResult(5); query.setMaxResults(5); Above will fetch 5 records from fifth record. You can use ScrollableResults but it will be slower compared to above

VB6 Recordset update

若如初见. 提交于 2019-12-12 01:52:42
问题 I am running a vb6 program that is looping through many records in a database table and entering a date into a field. This will take many hours to run. I am noticing that the number of records in the table is increasing by 1 every few seconds and then reducing by 1 (going back to the original count). Is there a reason for this? I am using a VB6 recordset and the update function i.e. rs.update. I am not inserting any new records. The code is as follows: rs.Open "select reference,value1

Oracle Stored Procedure Return Recordset with Field Names

删除回忆录丶 提交于 2019-12-11 23:16:57
问题 I am new to Oracle and Stored Procedures. I just would like to know if its possible, like in SQL Server, to return a recordset with Field Names to an extern program. I read some documentations but I'm not sure if I'm on the right track. When I use Sys_Refcursor I can only return one Field and not as many as I would like to. I need to return multiple Field Names and I have one input parameter. In the documentation of the program, i have an example for SQL Server and I would like to have the

MSDatashape being deprecated

房东的猫 提交于 2019-12-11 17:52:48
问题 In the following microsoft documentation: - https://docs.microsoft.com/en-us/sql/ado/guide/appendixes/microsoft-data-shaping-service-for-ole-db-ado-service-provider?view=sql-server-2017 this feature is being removed and the suggestion is to use XML. Has anyone done this? I'm wondering what they mean, in terms of loading the structure of what MSDataShape is by using XML, or just to use XML objects? TIA 回答1: I believe this is referring to the FOR XML clause of T-SQL, which performs much the

Implementing XmlTextWriter in new XmlRecordsetWriter for Streams

不想你离开。 提交于 2019-12-11 17:08:25
问题 For background see my question here. So the problem now isn't that I can't send a DataSet to classic ASP but that it can't do anything with it. So I found some code to create a recordset xml structure from a DataSet . I have tweaked it a little from it's original source. The problem is that I can't seem to extract the base stream and use it instead of having to write to a file. What am I missing? Here is how I am trying to test the class: [Test] public void TestWriteToStream() { MemoryStream

Speed Up SQL Update Statement That Is Looped Through A Select Statement

允我心安 提交于 2019-12-11 16:55:36
问题 Found a SQL query in code that takes 31 minutes to complete (1900 seconds). First a select statement grabs 1955 rows, then the code loops through these rows to run an update based on a number inside that recordset. The table it runs through has 14,000 rows. How can I speed this up? $sql = "select id, did, customer_id from dids"; $rs = $db->PDOquery($sql, $qry_arr); //Loop through all DIDs and attach to cdrs select id, did, customer_id from dids while($row=$rs->fetch()){ $qry_arr = array(':did

VB6 - IIF (ISNULL(rs),“TRUE”,Replace())

半腔热情 提交于 2019-12-11 14:05:42
问题 why i cannot use : rep8_bc = IIf(IsNull(rs(8)), "null", Replace(rs(8), "'", "''")) it say " Invalid use of Null" but if i remove replace, it's work. And then get error because record have an apostrophe character, so i change the code into this : rep8_bc = "null" If IsNull(rs(8)) = False Then rep8_bc = Replace(rs(8), "'", "''") or this : If IsNull(rs(8)) = False Then rep8_bc = Replace(rs(8), "'", "''") else rep8_bc = "null" end if 回答1: Mostly likely compiler doesn't short circuit within IIF()

Why is my recordset result accessed repeatedly and not cached?

为君一笑 提交于 2019-12-11 13:58:11
问题 I have a DAO.Recordest called products which I assign like this Set products = db.OpenRecordset("Product URLs for Sitemap") "Product URLs for Sitemap" is a query which when ran makes use of a custom VBA function to populate one of it's columns. What I am expecting to happen is that products will contain the contents of the query after it has ran, like a table. However this does not seem to be the case. Once I have my products recordset I am then looping over it and creating some XML from it

VB6 Oracle Retrieving Clob into an array

一曲冷凌霜 提交于 2019-12-11 12:37:08
问题 I am trying to retrieve an oracle field with datatype clob into a VB array without reformating the retrieval SQL string (simply SELECT * FROM my_table). I am using an ADO recordset. The clob values are lost when I close the connection or do any other action with the recordset. How can I achieve this. 回答1: In one of my projects I tried to manipulate BLOBs and CLOBs using ADO, but without any success, until I switched to Oracle Objects 4 OLE. You need to install and configure Oracle client on

ASP Classic recordset unable to see columns with 'table.column_name' format after MySQL conversion

巧了我就是萌 提交于 2019-12-11 11:57:47
问题 I am currently in the process of converting a large amount of ASP classic/VBscript pages from an old database (Unify Dataserver) to MySQL. Say you have a query like this: sql = "SELECT c.container_type, c_amount, c_sdate, c_edate, csrt " & _ "FROM containers c, container_chars cc" objRS.Open sql, objConn, 3, 1 If I want to reference the column "c_edate", I can simply use this and it works fine: x = objRS("c_edate") However, when it comes to referencing a column like "c.container_type" (With a