mybend has asked for the wisdom of the Perl Monks concerning the following question:
I have a code which is suppose to update a single entry in the db. The connection to the db is fine, it works and displays the correct data. The sql query is fine as well, it does update the db if I use it in MS SQL Server. Problem: the code does not update the db entry.
$mssql_server_name = "server_name"; $url = "http://url; $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";
Many thanks!
Mybend
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: update db problem
by kennethk (Abbot) on Jun 14, 2010 at 15:13 UTC | |
by mybend (Initiate) on Jun 14, 2010 at 15:54 UTC | |
by kennethk (Abbot) on Jun 14, 2010 at 16:02 UTC | |
by mybend (Initiate) on Jun 14, 2010 at 17:39 UTC | |
by kennethk (Abbot) on Jun 14, 2010 at 17:54 UTC | |
| |
|
Re: update db problem
by Generoso (Prior) on Jun 14, 2010 at 17:01 UTC | |
by mybend (Initiate) on Jun 14, 2010 at 17:45 UTC | |
|
Re: update db problem
by pajout (Curate) on Jun 15, 2010 at 07:39 UTC | |
by mybend (Initiate) on Jun 15, 2010 at 12:32 UTC | |
by choroba (Cardinal) on Jun 15, 2010 at 13:11 UTC |