Jump to content

SQL Connection


suzie
 Share

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
Edited by suzie
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...