Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADODB.Command macht AutoRefresh der Parameter?

7 views
Skip to first unread message

Richard Ohl

unread,
Jan 17, 2013, 7:24:49 AM1/17/13
to
Hi,
ich habe ein "ganz tolles" Problem:

Ich nutze eine wrapper funktion für command objects. Üblicherweise erstelle
ich meine Parameter manuell, statt die Refresh methode zu nutzen. Nun wird
aber beim setzen des CommandText die Parameter collection automatisch
befüllt (also habe ich nun alle Parameter doppelt). Einige andere Prozeduren
funktionieren nach wie vor - ich blicke gerade nicht durch, warum es
plötzlich anders sein soll.
Hier ist der Code:

Function fNewADOCmd(Optional pstrCmdText As String, _
Optional pintType As ADODB.CommandTypeEnum =
adCmdStoredProc, _
Optional pblnNamed As Boolean = True) As ADODB.Command

Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
With cmd
Set .ActiveConnection = fCnn
.CommandType = pintType
.CommandText = pstrCmdText
.NamedParameters = pblnNamed
End With
Set fNewADOCmd = cmd
Set cmd = Nothing
End Function

Parameter ist so lange leer, bis .CommandText = pstrCmdText aufgerufen wird.

Vielen Dank für jeden Denkanstoß,
Richard
--
Don't take life too seriously. You'll never get out alive. -- Bugs Bunny
0 new messages