1 2 3 4 5 6 7 8
#!c:\perl\bin\perl.exe -w # Datenbank -- Zelleninhalt verändern use Win32::ODBC; $db = new Win32::ODBC('test'); $db->Sql("UPDATE Tab2 SET SP2='444333' where Sp1 = '333'"); $db->Close();
1 2 3 4 5 6 7 8 9 10 11
#!c:\perl\bin\perl.exe -w # Datenbank -- Zelleninhalt verändern use strict; use warnings; use Win32::ODBC; my $db = new Win32::ODBC('test') or Win32::ODBC::DumpError(); $db->Sql("UPDATE Tab2 SET SP2='444333' where Sp1 = '333'") or $db->DumpError(); $db->Close() or $db->DumpError();
1
2
3
4
5
my $password = 'verysecretpassword';
my $user = 'John';
my $database_name = 'test';
my $db = new Win32::ODBC("DSN=$database_name;UID=$user;PWD=$password")
or Win32::ODBC::DumpError();