On Tue, 16 Sep 2003, Mark Elliott wrote: > I get this error: > > "[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored > procedure 'insert into hosts (HOST,lastchk) > > When I attempt to insert a bunch of rows into a MSSQL table. It gets data > from a text file. > > Here is the code: > > use Win32::ODBC; > $prox = new Win32::ODBC("DSN=wilma"); > @_ = <>; > foreach $_(@_){ > /(.*)\t(.*)\t(.*)/; > $strsql = '"insert into hosts (HOST,lastchk) VALUES > (\''.$1.'\',\''.$3.'\');"'; > print $strsql; > > if ($prox->sql($strsql)){$prox->DumpError} > $prox->sql($strsql); > $foo = <>;} > > $prox->Close(); >
All your '\' strings need to be changed to '\\'. **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs