I have the DB installed on windows, using 5.12. The password and users name I am using is root and the db and ip are correct - I use the same info on a mac client to connect to the db no problem (mac app, not command line). I am not even sure what data source name means. Sorry for the bad post, but I need to get something accomplished tonight and have already spent hours online trying to solve it. Thanks for your time, SDBI connect('d60380940:192.168.1.3','HASH(0x238b3c)',...) failed: [Mic +rosoft][ODBC Driver Manager] Data source name not found and no defaul +t driver specified (SQL-IM002) at CRTDBTBL.pl line 46 Cannot connect to the database ERROR: 1 ([Microsoft][ODBC Driver Manager] Data source name not foun +d and no d efault driver specified (SQL-IM002))
sub open_dbi { # Declare and initialize variables my $host = '192.168.1.3'; my $db = d60380940; my $db_user = root; my $db_password = root; # Connect to the requested server # my $dbh = DBI->connect("dbi:mysql:$db:$host", "$db_user", "$db_pa +ssword", {RaiseError => 0, PrintError => 0} ) or err_trap("Cannot con +nect to the database"); my $dbh = DBI->connect("dbi:ODBC:d60380940:192.168.1.3", {RaiseErr +or => 0, PrintError => 0} ) or err_trap("Cannot connect to the databa +se"); return $dbh; }
In reply to Lost over DBI in perl by sdyates
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |