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.

ADO-Parameter-Datentyp als Variable

Empfohlene Antworten

Veröffentlicht

Hallo!

kann mir jemand sagen, ob ich einen ADO-Parameter-Datentyp als Variable übergeben kann?

z.B.

Dim str as String

str = "adInteger"

Dim prm As ADODB.Parameter

Dim cmd As ADODB.Command

Set cmd = New ADODB.Command

Set prm = New ADODB.Parameter

cmd.ActiveConnection = Application.CurrentProject.Connection

cmd.CommandText = "Form1"

cmd.CommandType = adCmdStoredProc

prm.Type = str

prm.Direction = adParamInput

prm.Value = Forms!Formular1!Position

cmd.Parameters.Append prm

cmd.Execute

Bei diesem Code bekomme ich eine Fehlermeldung:confused:

Bei diesem Code bekomme ich eine Fehlermeldung

wäre halt nett gewesen, wenn du die fehlermeldung gepostest hättest. so ist die information null wert. :(

ADODB.Parameter wird normalerweise von CreateParameter, einer methode von ADODB.Command zurückgegeben und dann mit Append einer instanz von ADODB.Command übergeben - das ist eine enum und kein string, kann daher nur einen der folgenden werte annehmen:

ADODB.DataTypeEnum.adBoolean;

ADODB.DataTypeEnum.adUnsignedTinyInt;

ADODB.DataTypeEnum.adChar;

ADODB.DataTypeEnum.adDate;

ADODB.DataTypeEnum.adCurrency;

ADODB.DataTypeEnum.adDouble;

ADODB.DataTypeEnum.adSmallInt;

ADODB.DataTypeEnum.adInteger;

ADODB.DataTypeEnum.adBigInt;

ADODB.DataTypeEnum.adTinyInt;

ADODB.DataTypeEnum.adSingle;

ADODB.DataTypeEnum.adUnsignedSmallInt;

ADODB.DataTypeEnum.adUnsignedInt;

ADODB.DataTypeEnum.adUnsignedBigInt;

ADODB.DataTypeEnum.adVarChar;

s'Amstel

Habe verstanden!

VIELEN DANK!

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.