suzie Posted June 28, 2010 Share Posted June 28, 2010 Dear ffriends,we have an SQL Server Enterprise manager running on microsoft windows server 2003,we have a database created on this SQL, from where we read our data for our online site, Now I have created a new database under the current one, but when I connect to it I receive thr following Error:Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\wamp\www\Annahar_website\New-BackOffice\Annahar_backOffice\artic_update.php on line 16any help please, what shall I do here???please I need help Link to comment Share on other sites More sharing options...
boen_robot Posted June 28, 2010 Share Posted June 28, 2010 It seems your PHP file is using ODBC to connect to the databse. You need to add the new DB as a Data Source Name, and specify it at odbc_connect(). the ODBC part of the PHP tutorial explains how to do it for MS Access. For MS SQL, it should be from the same place. Link to comment Share on other sites More sharing options...
suzie Posted June 29, 2010 Author Share Posted June 29, 2010 thanks for your helpbut how to add it as a data source??the connection am using : $db_remote = 'new_temp'; $sqlconnect=odbc_connect($db_remote,$username,$password);thanks for your help Link to comment Share on other sites More sharing options...
suzie Posted June 29, 2010 Author Share Posted June 29, 2010 I add the database to Data sources ODBC, but now am receiving:SQL error: [Microsoft][ODBC SQL Server Driver] Could not truncate table 'artic' because this table does not exist in database 'master'., SQL state S0002 in SQLExecDirect in SQL error: [Microsoft][ODBC SQL Server Driver][sql Server]Invalid object name 'artic'., SQL state S0002 in SQLExecDirect in artic is a table in new_temp database Link to comment Share on other sites More sharing options...
boen_robot Posted June 29, 2010 Share Posted June 29, 2010 Well, the error message pretty much says it: You need to recreate the "artic" table... and every other table for that matter I'd add.Do you have your create statements from your old SQL server? You need to execute them on the new one if you haven't already. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.