Richard Ohl
unread,Jan 17, 2013, 7:24:49 AM1/17/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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