Leser: 13
1 2 3 4
... use DBI ... my $db = DBI->connect('DBI:ODBC:Driver={SQL Server};server={DSR5003};database={datenbankname}')
1 2 3 4 5 6 7 8 9 10 11
package datenbank::Model::dDB; use strict; use base 'Catalyst::Model::DBI'; __PACKAGE__->config( dsn => "DBI:mysql:" . datenbank->config->{db}{db}, user => datenbank->config->{db}{user}, password => datenbank->config->{db}{password}, options => {}, );
my $db = DBI->connect('DBI:ODBC:Driver={SQL Server};server={DSR5003};database={datenbankname}')
my $db = DBI->connect('DBI:ODBC:Driver={SQL Server};server={DSR5003};database={datenbankname}')
1 2 3 4 5 6 7 8 9 10 11
package datenbank::Model::dDB; use strict; use base 'Catalyst::Model::DBI'; __PACKAGE__->config( dsn => "DBI:ODBC:Driver={SQL Server};server={DSR5003};database={" . datenbank->config->{db}{db} . "}:", user => datenbank->config->{db}{user}, password => datenbank->config->{db}{password}, options => {}, );