HI
I want to create a DSN programmatically ( not using GUI). The database that i want to create a DSN for is MS SQL server. I know that i need to use the ConfigDSN function but it takes a set of options where i need to set the differetn options like server name , port number, user name , password etc. I know how to set all other parameters in that but i dont know how to set the port number and since i am not setting the port number it is taking the default port and i am not able to connect. Can some body help me with a working code??????
Win32::ODBC::ConfigDSN(ODBC_ADD_SYS_DSN,"SQL Server","DSN=$dsn","SERVER=$sqlServer","ADDRESS=$address","Database=$database","NETWORK=DBMSSOCN","TRUSTED_CONNECTION=NO"
or die "couldn't create $dsn because ", Win32::ODBC::Error(), "\n";
this is a working code but it does not set the port number so it does not create a correct DSN. please help me how to do it?
thanks
I want to create a DSN programmatically ( not using GUI). The database that i want to create a DSN for is MS SQL server. I know that i need to use the ConfigDSN function but it takes a set of options where i need to set the differetn options like server name , port number, user name , password etc. I know how to set all other parameters in that but i dont know how to set the port number and since i am not setting the port number it is taking the default port and i am not able to connect. Can some body help me with a working code??????
Win32::ODBC::ConfigDSN(ODBC_ADD_SYS_DSN,"SQL Server","DSN=$dsn","SERVER=$sqlServer","ADDRESS=$address","Database=$database","NETWORK=DBMSSOCN","TRUSTED_CONNECTION=NO"
this is a working code but it does not set the port number so it does not create a correct DSN. please help me how to do it?
thanks