|
Friends,
I'm calling an ActiveX DLL I wrote in VB from VC++. In the VB, I'm using the VB data environment to do a parameterized insert. Everything is OK until I get a duplicate key. As soon as the DataEnvironment.Commands(1).Execute statement runs, VB immeadiately returns to the C++ caller; the hResult is 0x800A0CC1, which doesn't make any sense being that the previous 812 insert suceeded. What I'm trying to do is trap the error on the VB side (using on error goto) so I can log it prior to returning to the caller. But, the error routine never runs due to the immeadiate return.
Any help will be much appriciated!
Thanks,
David Douglass
Bloomingdale, NJ
|
|
|
|
|
i have a program that connect to odbc((user DSN))
and i want to install it with installshield
i don't know that set odbc connection in install shield.
thanks
|
|
|
|
|
Can anyone suggest a report tool, add-in or something that I can use in my C++ project that tracks some basic usage data. Do most developers roll their own when they need to provide 10 or so, simple reports to screen and printer?
Any ideas would be appriciated.
Regards
Rod Hamilton
|
|
|
|
|
hi,
Does anybody know how to use SQLXML Type Library in Visual C++ programs...
I need it to do some XML-data retrieving from SQL server 7.0.Or if there is another way to use SQL Server 7.0's XML features through ADO,please let me know...
Greetings from Germany
Özgür
Bachelor of Control&Computer Engineering from IStanbul Technical University
Worked with Delphi for 6 Months
Worked with Java for 3 Months
Now ,Working with MFC,VIsual C++6.0 and ADO
|
|
|
|
|
I've got my application ready and it is running perfect under my developing computer (win95), but on an other machine (winNT) it doesn't start at all!!! No error-message is shown!
I think the proplem has to do with the control "Microsoft ADO Data Control, version 6.0 (OLEDB).lnk"
It is a matter of different paths?
"c:\windows\system\msadodc.ocx" on w95 and
"c:\winnt\system32\msadodc.ocx" on NT ?
I already use the MFC as a static lib. ADO 2.5 is installed on both computers.
Please help me!
Friedrich
|
|
|
|
|
Try to load dynamically the component... The #import <filename> is almost always a bad idea.
LoadTypeLibrary, CoCreateInstance, even old LoadLibrary can help.
Or it can be a different version control that has some methods on 95 and other on NT. Trying to call the method "7" when the interface implements only "6"...
By the way, application doesn't tell nothing? No crash, no "Debug", nothing? What does it mean "doesn't start at all"?
|
|
|
|
|
Sorry, I was not precise enough.
I didn't use the #import, I used "Project | add | Controls | Registred Active-X controls"...
(sth like that, I'm using a german visual studio)
I dragged the control with the mouse to a dialog in the dialog-editor ( and a MS-Data Grid etc )
"Nothing" means, nothing happens if i double click on the Icon in Win Explorer. Just as it wasn't there.
To Debug, i would have to install Visual sudio to the NT system. But I wanted to avoid it, cause it is always a matter: running on the development-computer is successfull, running on an other system fails:
On another NT System with Visual Studio, the application started, the starting querie succeded, but the user-queries failed (access error).
?
Thanks for your answer.
Friedrich
|
|
|
|
|
... using InstallShield. It has made a setup.exe with all things which are needed.
Thanks
Friedrich
|
|
|
|
|
Hi,
I am just a beginner in this field.I want to learn more about how to retrieve database information as XML data from SQL Server.I got the basic concept,now i need some code snippets that can let me fly.All the information that i could find on internet was for Visual Basic developers..I am working with Visual C++ and ADO and SQL Server 7.0.Can anybody show me some code or some internet sites devoted to Visual C++ developers..Also
what else,i need to be able to use XML features of SQL Server?
with greetings from Germany
Özgür
Bachelor of Control&Computer Engineering from IStanbul Technical University
Worked with Delphi for 6 Months
Worked with Java for 3 Months
Now ,Working with MFC,VIsual C++6.0 and ADO
|
|
|
|
|
Hi
I tried to make my CRecordset derived class using a dynaset instead of a snapshot, and suddenly the recordset object was readonly. Why? How can I fix it?
I'm letting the CRecordset-derived object manage my CDatabase object, and uses only default open and construction parameters.
|
|
|
|
|
I have a need to replicate and synchronize an .mdb file in VC++ 6.0. I see that the JRO contains CreateReplica() and Synchronize() methods, these are precisely what I need to do. What I need to know is how to create the Replica object, I've seen reference to IReplica in the msjro.tlb file but I'm not sure what is the Replica equivalent of _ConnectionPtr. Once I know how to create the Replica object the rest should fall into place.
Roger Cornell
|
|
|
|
|
I've got a solution for my own question now, here it is.
I've found out how to create a replica of an Access .mdb file through VC++. Here's the code.
This code goes at the end of STDAFX.H
#import "C:\\program files\\common files\\system\\ado\\msado21.tlb" \
no_namespace \
rename("EOF", "adoEOF")
#import "C:\\program files\\common files\\system\\ado\\msjro.dll"
MSJRO.DLL uses a namespace JRO.
This code goes in a .CPP file
CoInitialize(NULL);
JRO::IReplicaPtr m_pReplica;
HRESULT hr0;
hr0 = m_pReplica.CreateInstance(__uuidof( JRO::Replica ) );
if(SUCCEEDED(hr0))
{
CString m_connectString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\\JDOCS\\Data\\JDOCS.mdb";
m_pReplica->PutActiveConnection(_bstr_t(m_connectString));
CString m_repName = "D:\\JDOCS\\Data\\JDOCSRep2.mdb";
CString m_repDesc = "JDOCS Database Replica";
m_pReplica->CreateReplica(_bstr_t(m_repName), _bstr_t(m_repDesc), JRO::jrRepTypeFull, JRO::jrRepVisibilityGlobal, -1, JRO::jrRepUpdFull);
}
CoUninitialize();
Roger Cornell
|
|
|
|
|
Anyone can tell me where I can find the C/C++ source code on how page and buffer manager are
implemented in a database system? I need to get some ideas about this. Thank you
|
|
|
|
|
Hi,
Is anybody knows the procedure to interact with an excel defined table from VC++?
thanks
|
|
|
|
|
I have been staring at this for 2 hours now and can't put my finger on the problem. Any comments would be helpful:
rs is a recordset that is already opened.
Platform is IIS 5 running on Windows 2000 Pro.
Database is SQL Server 2000
<br />
if rs.supports(adAddNew) and rs.supports(adUpdate) then<br />
rs.AddNew<br />
... update fields here<br />
rs.Update<br />
end if<br />
the problem is that I get an error telling me that the database can't be updated on the rs.AddNew line!
|
|
|
|
|
I'm looking for an IDE for developing store procedure in SQL Server with debugging, context help, code assist, ecc.... Does anybody know something for me?
Thanks!
|
|
|
|
|
VC 6 or InterDev 6...
You can set both up to support debugging of Stored Procedures on SQL Server.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I've got a MS Data-Grid Control V6.0 OLEDB in my application. Is there an easy way to print it?
Or alternavtively: Is there a way to copy it and paste to Excel?
:-|
Thanks.
Friedrich
|
|
|
|
|
When I am trying to do data manipulation in tables having CLOB columns
I have XML file which is having around file size of 10k bytes, not being able to insert more than 4000 bytes in LOBs column.
Can anyone have sample code to resolve this issue.
Current Environment :
C++ using ADOs in ORACLE. OLEDB provider is Oracle - OraOLEDB.
Oracle version details: Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
parag
|
|
|
|
|
Install the 8.1.7.2.0 version of the Oracle OLEDB Provider from Oracle. 8.1.6.x is no longer supported.
|
|
|
|
|
Hi Guys,
I have been using ADO to execute queries asynchronisly. I am using adUserServer as Cursor location and adAsyncExecute flag to run the query using Recordset-->Open method.But the problem is if i cancel the query in between i get the following error:
Error No : 3712
Description: Opeartion has been cancelled by the user.
I don't understand why.
And if i use Command object's Execute method to run my query, then the query dosen't seems to run asynchrosnly.
Did anybody worked with ADO async queries?
Any help in this regard would be highly appreciated.
Cheers,
Mukesh
|
|
|
|
|
I have old code (prior to me even knowing how to code)
Global dsByJob as QueryDef
set dsByJob = db.OpenQueryDef("QryBrowseByJob")
How would this be handled in ADO. Is a recordset being created off the Query?
Thanks
Tim
|
|
|
|
|
Hello
I'm developying application for a pocketpc and i want to open a database, than i have imported from access (.mdb) as a .cdb file but i don't know how, i just start programming only for 2 months.
can't somedody help me to do this; it's really urgent!!!!
|
|
|
|
|
How do i use the RowFetchCount property for ADODataReader
Bascially what i want to implement is paging
|
|
|
|
|
hi
Im working on an application with VC++ MFC as front end and sybase installed on unix server as backend.
Can anyone tell me which method ADO or MFC DB Classes(CRecordset,CDatabase etc..) is better suited for DB Connections.
Please give detailed explanation?
YOur Help will be highly appreciated.
Aky
|
|
|
|