Jump to content

SQL Connection


suzie

Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...