in reply to update db problem

I do not have access to MS SQL so I can not test en see if this code works, but you have a running double quote in the line that starts with $url. And I have to agree that is better to use DBI

$mssql_server_name = "server_name"; $url = "http://url"; # <--------- runing doble quote $userName = "user_name"; $password = "passwd"; $connString = "tsql -H $mssql_server_name -p 1234 -U $userName -P $pas +sword -t '\<newrow\>' -o qh \<\< quit\n"; #Query to grab records created $cmd = $connString."update [dbname].[record] set record = 7\nGO\nquit\ +n"; $cmd = $connString."select * from [dbname].[record]\nGO\nquit\n"; $result = `$cmd`; print "RESULT $result\n";

Replies are listed 'Best First'.
Re^2: update db problem
by mybend (Initiate) on Jun 14, 2010 at 17:45 UTC
    Sorry, but I really don't understand what that line with double quote has to do with anything... I guess I'm missing something. I actually just forgot to delete it, it's not relevant, my apologies...