eig. funct mit SQL / funzt nicht
02.01.2008 10:53:00
Matthias
guten tag + gesundes neues jahr
kann hier mal jemand drüber schauen, kommt kein ergebnis an, wenn ich nve mit bezug (Bsp. B3 _
etc.)
erfasse? danke für hilfe
Function nve_pos(nve As String)
Dim tabl As String
tabl = "ps_carpos"
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=m-ware;DB=mware;HOST=192.168.30.16;SERV=sqlexec;SRVR=mware_net;PRO=sesoctcp; _
_
_
_
UID=mmm;PWD=123" _
, Destination:=Range("A1"))
.CommandText = Array( _
"SELECT carp_auftr_nr FROM " & tabl & " WHERE carp_nve = " & nve)
.Refresh BackgroundQuery:=False
End With
ActiveCell.Value = nve_pos
End Function