ado

Load a .bin file in SQL server 2005 Express database in vc++ application

I would like to put a binary file in varbinary(MAX) column using _RecordsetPtr in a vc++ application.I am sure that lot of people have done this before. But I am new to database programming. Help is urgently needed ...Thanks in advance. ...

ado sql update table with result of group by query

I am trying to update records in an .mdb table with the number of records containing the same value The sql below does not work but I think gives an indication of what I am trying to achieve. UPDATE table1 AS A INNER JOIN (SELECT PH_BSP , Count(PH_BSP) AS PHCOUNT FROM table1 GROUP BY PH_BSP) AS B ON A.PH_BSP=B.PH_BSP SET A.PH_SORT = ...

crash with CoUnintailize() api of COM

My main process(main.exe) initilaized COM library and created a thread which creates a new process(p1.exe) this new process is again initializing COM library and after making all references as zero unintialized COM here.. the unintailezed COM in the main process (i.e main.exe) also.... When i run p1.exe individually it is successful.. b...

ADO "Unspecified Error" instead of actual error when fetching server side cursor

This relates to my recent question: http://stackoverflow.com/questions/2835663/force-oracle-error-on-fetch I am now able to reproduce a scenario where using ADO with the Oracle OLEDB Provider, I can force an error such as ORA-01722: invalid number to occur on calling Recordset.MoveNext However, this is not the error that is returned to ...

Where can I find an ADOExpress tutorial?

I'm using Delphi 7, totally new to database programming, and need ODBC. I am told that ADOExpress is a good way to go, and that seems fair enough as it comes with Delphi 7. I need to programatically create, populate, modify and query a database (currently MySql, but that might change, hence ODBC). Can anyone recommend a good tutorial? T...

Delphi 7 SOAP client DB Grid apply updates and refresh

Is there any single event on the DataSet that I can use to make sure my client has applied updates and has the newest data from the SOAP Server? At the moment I need to add clientDataSet.applyupdates(0); clientDataSet.refresh; for each AfterDelete and AfterPost event on all datasets I use in my SOAP client? It seems rather a lot...

Empty Datagrid problem in VB6

Hello Recently, i encountered a problem; when I bind a recordset to datagrid ,and run the application the datagrid is not populated even though recordset has data I use the following code Option Explicit Dim conn As New ADODB.Connection Dim cmd As New ADODB.Command Dim recordset As New ADODB.recordset Private Sub InitializeConnec...

Delphi & Access

How can I use MS Access as a back-end database for a Delphi program? ...

How can I prevent ADO from creating multiple SPIDs?

I'm working on an application that creates a single ADO connection and keeps it open for the lifetime of the application. I have connection pooling turned off. (Please ignore the fact that this might not be best practice for the purposes of this question). If I spawn a new thread and use the exact same ADO connection, it uses a new SPI...

ADO Access Tab button

Hello I moved my access apllication from DAO into ADO connection. It works better but I am encountering a problem when I enter a value in a form's field then I push the tab button the screen takes me to the first fields of the form and I lose my activecontrol which is the control of the field in which i enter the value. N.B.: If I clic...

ADO program to list members of a large group.

Hi everyone, I'm attempting to list all the members in a Active Directory group using ADO. The problem I have is that many of these groups have over 1500 members and ADSI cannot handle more than 1500 items in a multi-valued attribute. Fortunately I came across Richard Muller's wonderful VBScript that handles more than 1500 members at ht...

Delphi 7: ADO, need basic coding example

I am a complete n00b here. Can someone please post some Delphi code to create a database add a simple table close the database then, later open a database read each table read each field of a given table perform a simple search Sorry to be so clueless. I did google, but didn't find a useful tutorial ... Btw, it would be usef...

Crash when checking BOF property of pessimistic locked ADO recordset

Bit of an odd one for you: I've got two connections to a database, on one I've opened a _RecordsetPtr with a pessimistic lock. I can no longer send an UPDATE command on the other connection. I can send a SELECT command on the second connection and data is returned. If I use a read only lock then there are no problems however when I use ...

How to Determine the Size of MSADO Command Parameters

I am new to MS ADO and trying to understand how to set the size on command parameters as created by the command.CreateParameter (Name, Type, Direction, Size, Value) The documentation says the following: Size Optional. A Long value that specifies the maximum length for the parameter value in characters or bytes. ... If...

Read XML file from ADO (VB6) Into .Net DataSet

I am trying to assist users in migrating from a VB6 application to a C# application. The VB6 app allows the export of data from an ADO (2.8) recordset via XML, but the C# application fails to read the XML producing the following error: System.Data.DuplicateNameException: A column named 'name' already belongs to this DataTable VB6 Code ...

Cannot update any cells in datagrid in vb6

Hello I'm trying to update a row in datagrid but the problem is that i can't even change its cell values I had set my datagrid AllowUpdate property to true , but i can't still change any cell values Option Explicit Dim conn As New ADODB.Connection Dim cmd As New ADODB.Command Dim recordset As New ADODB.recordset Public Action As String ...

Delphi / ADO : how to get result of Execute() ?

I have declared AdoConnection : TADOConnection; and successfully connected to the default "mysql" database (so, no need to pass that code). Now, taking baby steps to learn, I would like to AdoConnection.Execute('SHOW DATABASES', cmdText); which seems to work ok, in the sense that it doesn't throw an exception, but I am such a n00b tha...

Passing an TAdoDataset as parameter using TADOStoredProc

i have an oracle stored procedure with 2 parameters declarated as input cursors. how i can assign this parameters using the TADOStoredProc component? when try to assign the TADODataSet to the parameter can't compile the code because the ide gives me this error. incompatible types : OleVariant and TAdoDataset. ORACLE PROCEDURE MYSTO...

Delphi / ADO : WHich components? TADODataSet and TADOCommand or TADOQuery ?

According to http://www.delphigroups.info/2/3/181838.html The preferred approach with ADO components is to use TADODataSet and TADOCommand. TADOQuery (and TADOTable and TADOStoredProc) are provided for compatibility. Use TADODataSet for SQL that returns result-sets and TADOCommand for SQL that does not. I am a ...

COM: How to handle a specific exception?

i'm talking to a COM object (Microsoft ADO Recordset object). In a certain case the recordset will return a failed (i.e. negative) HRESULT, with the message: Item cannot be found in the collection corresponding to the requested name or ordinal i know what this error message means, know why it happened, and i how to fix it. But ...