[Solved] connecting to sql database in java [closed]
Problem is in your odbc connection goto ControlPanel->AdministrativeTools->DataSource(ODBC)->System DSN->ADD->SqlServer-> then in the name field give the Source Name. you have to use this name instead of testdb in your DriverManager.getConnection method. Because getConnectionMethod take the source name not the database name. so your code is not working. However after filling the source name fill the … Read more