#90361 - 2002-12-05 02:00 PM
IDispatch error
|
Frode S. Hansen
Lurker
Registered: 2002-12-05
Posts: 2
Loc: Frederiksborg Amt
|
I'm trying to implement automated logging of some hardware information to a MSSQL DB at logontime but i keep getting the errormessage "Script error: IDispatch pointers not allowed in expressions!" in both v. 4.11 and v. 4.12. The script looks like this: $Komm = "(a string containing a call to stored procedure wit parameters)"
$SQLConn = CreateObject("ADODB.Connection") $SQLConn.ConnectionString = "Driver={SQL Server};Provider=SQLOLEDB;Server=xxxx;Database=nnnn;Trusted_Connection=Yes" $SQLConn.ConnectionTimeout = 30 $SQLConn.Cursorlocation=3 $SQLConn.Open $SQLConn.Execute($Komm)
The SQL-orders contained in $Kom are executed ok on the server but the script terminates, allowing me only one SQL-order in the last line for the script.
I'll be gratefull for any help!
_________________________
I never visited a more inspiring BBS than this.
|
|
Top
|
|
|
|
#90363 - 2002-12-05 02:13 PM
Re: IDispatch error
|
Frode S. Hansen
Lurker
Registered: 2002-12-05
Posts: 2
Loc: Frederiksborg Amt
|
You're certainly wild at guessing! This line did the trick:
$ = $SQLConn.Execute($Komm)
You've saved the day for me! Thanks a lot.
_________________________
I never visited a more inspiring BBS than this.
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 657 anonymous users online.
|
|
|