recordset

How should Iterator implementation deal with checked exceptions?

百般思念 提交于 2019-12-05 22:04:34
问题 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 mention what to do when there is an entirely unrelated problem caused by e.g. network or disk IO problems. Simply throwing SQLException in next() and hasNext() is

Performance of passing data between .Net and COM assemblies

风格不统一 提交于 2019-12-05 18:41:55
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 see if the runtime can be improved. The method in question manipulates ADODB Recordsets. Is there any performance issues I should be aware of or take into consideration since these recordsets will be passed to and from VB6 via COM interop? I haven't done anything

How to populate a ListBox with a ADODB.Recordset (Error 91) To Do Autocompletion in Access

拜拜、爱过 提交于 2019-12-05 05:11:10
I work on an Access DB and I have to use a Datasource connection to a SQL Server. To do that I use the ADODB object with : -ADODB.Connection -ADODB.Recordset Code Up-to-date, following an observation of Ian Kenney Dim cnn As ADODB.Connection Set cnn = New ADODB.Connection Dim rs As ADODB.Recordset cnn.ConnectionString = "driver={SQL Server};provider=SQLOLEDB;server=10.****;uid=****readonly;pwd=****readonly;database=****" cnn.Open Set rs = cnn.Execute("SELECT [MATRI], [NOMPRE] FROM SCHEME_DB.TABLE WHERE NOMPRE LIKE '*" & Me.Textbox_recherche.Text & "*'") Me.Liste_choix.RowSourceType = "Table

Android and Azure Mobile Services: Using invokeAPI to return recordset

三世轮回 提交于 2019-12-05 02:49:42
问题 I am trying something very simple. I have a custom API called "missingvehiclesfrominventoryjob" and it simply returns a record set from an standard SQL Query. I can do this in my WinForms and Windows Phone app easily but I cannot figure out how to do this on the Android App. Here is my code: (which DOES NOT COMPILE in Android Studio): msClient.invokeApi("missingvehiclesfrominventoryjob", kd, new ApiOperationCallback<List<InventoryProspects>>(){ @Override public void onCompleted(List

ADODB RecordSet as Access Report RecordSource

柔情痞子 提交于 2019-12-04 04:46:25
I have a simple form, a query and a report in Access 2003. I have to manipulate the results from the query in a recordset using VBA and then pass it on to the report as its RecordSource. If I declare the recordset as RecordSet and use its Name property as the RecordSource of the report then it is working. However, because I need to edit the recordset, I though it would be easier to use an ADODB RecordSet as below. The records set is declared as Dim rs As ADODB.RecordSet in a global module. The rest of the code is; Dim db As Database Set db = CurrentDb Dim con As ADODB.Connection Set con =

How should Iterator implementation deal with checked exceptions?

岁酱吖の 提交于 2019-12-04 03:53:03
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 mention what to do when there is an entirely unrelated problem caused by e.g. network or disk IO problems. Simply throwing SQLException in next() and hasNext() is not possible because it is incompatible with the Iterator interface. Here is my current code

How to return a recordset from a function

穿精又带淫゛_ 提交于 2019-12-04 01:30:27
问题 I'm building a data access layer in Excel VBA and having trouble returning a recordset. The Execute() function in my class is definitely retrieving a row from the database, but doesn't seem to be returning anything. The following function is contained in a class called DataAccessLayer. The class contains functions Connect and Disconnect which handle opening and closing the connection. Public Function Execute(ByVal sqlQuery As String) As ADODB.recordset Dim rs As ADODB.recordset Set rs = New

Recordset Closed After Stored Procedure Execution

冷暖自知 提交于 2019-12-04 01:13:10
问题 I'm executing a stored procedure using ADO in VBA. I'm trying to populate the recordset with the results from a stored procedure in SQL Server 2008. Example of the VBA below: Public Function DoSomething() As Variant() Dim oDB As ADODB.Connection: Set oDB = New ADODB.Connection Dim oCM As ADODB.Command: Set oCM = New ADODB.Command Dim oRS As ADODB.Recordset oDB.Open gcConn With oCM .ActiveConnection = oDB .CommandType = adCmdStoredProc .CommandText = "spTestSomething" .NamedParameters = True

Android and Azure Mobile Services: Using invokeAPI to return recordset

给你一囗甜甜゛ 提交于 2019-12-03 20:04:19
I am trying something very simple. I have a custom API called "missingvehiclesfrominventoryjob" and it simply returns a record set from an standard SQL Query. I can do this in my WinForms and Windows Phone app easily but I cannot figure out how to do this on the Android App. Here is my code: (which DOES NOT COMPILE in Android Studio): msClient.invokeApi("missingvehiclesfrominventoryjob", kd, new ApiOperationCallback<List<InventoryProspects>>(){ @Override public void onCompleted(List<InventoryProspects> missingVehicles, Exception e, ServiceFilterResponse serviceFilterResponse){ for

How to populate a ComboBox with a Recordset using VBA

六月ゝ 毕业季﹏ 提交于 2019-12-03 12:56:51
There is some literature available at expert's exchange and at teck republic about using the combobox.recordset property to populate a combobox in an Access form. These controls are usually populated with a "SELECT *" string in the 'rowsource' properties of the control, referencing a table or query available on the client's side of the app. When I need to display server's side data in a combobox, I create a temporary local table and import requested records. This is time consuming, specially with large tables. Being able to use a recordset to populate a combobox control would allow the user to