Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

  • Autor

hmm... schuld sind wider die CDBPropSet, denn wenn ich es so schreibe

propset.AddProperty(DBPROP_UPDATABILITY, true);

dann funktioniert , leider kann ich kein insert usw machen ( logischerweise )

wenn ich so schreibe

propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE );

kriege ich Fehler ;((((

Ich habe im netz so was gefunden, so was

leider komme ich damit nicht klar denn die Funktion :

DtcGetTransactionManager wird bei mir nicht gefunden ;((

Kann mir jemand helfen ????????????????

  • Autor

stimmt, dann kriege ich aber Fehler :

error LNK2001: Nichtaufgeloestes externes Symbol "long __cdecl DtcGetTransactionManager(char *,char *,struct _GUID const &,unsigned long,unsigned short,void *,void * *)" (?DtcGetTransactionManager@@YAJPAD0ABU_GUID@@KGPAXPAPAX@Z)

also ich versuche es so:


// SQLOLEDB interfaces used in the example.
IDBCreateSession* pIDBCreateSession = NULL;
ITransactionJoin* pITransactionJoin = NULL;
IDBCreateCommand* pIDBCreateCommand = NULL;
IRowset* pIRowset = NULL;

// Transaction dispenser and transaction from MS DTC.
ITransactionDispenser* pITransactionDispenser = NULL;
ITransaction* pITransaction = NULL;


// Get the command creation interface for the session.
if (FAILED(hr = pIDBCreateSession->CreateSession(NULL,
IID_IDBCreateCommand, (IUnknown**) &pIDBCreateCommand)))
{
AtlTraceErrorRecords(hr);
return hr;
}

// Get a transaction dispenser object from MS DTC and
// start a transaction.
if (FAILED(hr = DtcGetTransactionManager(NULL, NULL,
IID_ITransactionDispenser, 0, 0, NULL,
(void**) &pITransactionDispenser)))
{
AtlTraceErrorRecords(hr);
return hr;
}
if (FAILED(hr = pITransactionDispenser->BeginTransaction(
NULL, ISOLATIONLEVEL_READCOMMITTED, ISOFLAG_RETAIN_DONTCARE,
NULL, &pITransaction)))
{
AtlTraceErrorRecords(hr);
return hr;
}
[/PHP]

wenn ich aber die DtcGetTransactionManager auskommentire kriege ich beim debugging auf der stelle pIDBCreateSession->CreateSession

abnormale Fehler

  • Autor

Eigentlich das ganze dreht sich nur um XACT_ABORT, denn wenn ich direkt von SQL Server versuche was zu inserten muß ich XACT_ABORT auf on setzen.

Ich dachte mir das gleich mache ich mit OLE DB, also in eine sesion SET XACT_ABORT ON und dann insert, etwa so :

CCommand<CNoAccessor,CNoRowset> cmoo;

cmoo.Create(session, " SET XACT_ABORT ON");

cmoo.Open();

leider bevor ich es mache muß ich in CDBPropSet in sagen dass ich inserten will und dass brieng in durcheinander ( glaube ich )

Andere Frage: wenn ich inserten will mit OLE DB muss ich auch denn command öffnen mit select * from tabelle und alle Daten holen ( was bei vielen Daten sehr lange dauern kann ) oder gibt es eine andere Möglichkeit ???

Original geschrieben von bigpoint

stimmt, dann kriege ich aber Fehler :

error LNK2001: Nichtaufgeloestes externes Symbol "long __cdecl DtcGetTransactionManager(char *,char *,struct _GUID const &,unsigned long,unsigned short,void *,void * *)" (?DtcGetTransactionManager@@YAJPAD0ABU_GUID@@KGPAXPAPAX@Z)

xoleHlp.Lib ins Projekt gelinkt?

  • Autor
Original geschrieben von Klotzkopp

xoleHlp.Lib ins Projekt gelinkt?

ja den Fehler kriege ich auch nicht mehr, aber beim debugin komme nicht weiter bei der stelle


	// Get the command creation interface for the session.

			if (FAILED(hr = pIDBCreateSession->CreateSession(NULL,

			 IID_IDBCreateCommand, (IUnknown**) &pIDBCreateCommand)))

		{

			AtlTraceErrorRecords(hr);

			return hr;

		}

das ganze mache ich in Funktion Open vor

CDBPropSet dbinit(DBPROPSET_DBINIT);

Fehler:

Unbehandelte Ausnahme in ......exe 0xC0000005: Access Violation

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.