Error Microsoft OLE DB Provider for ODBC Drivers
Hello,
I have developed a code in ASP and I get an error when I run that file. Here below i have mentioned that problem if anybody tell me what wrong with it then i will be thankful to him
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D) / Appli_AVK / connection_SQL.asp, line 5
Here is the code of my ASP file connection to a database SQL Server 2005
Code:
<%
set conn_SQL = Server. CreateObject ( "ADODB.Connection")
connstring_SQL = "driver = (SQL SERVER); server = S53DNVMV171; uid = cli_prev_planif_avk; pwd = pass; cli_articles database ="
conn_SQL. connstring_SQL open
%>
Thanks for your suggestion.
Re: Error Microsoft OLE DB Provider for ODBC Drivers
Have you set up DSN for your OLE DB, When you set up the DSN, you need to change the default database to the database that contains all of the Commerce Server tables. If the "Change the default database to:" option is left unchecked or points to a database other than the one that contains the Commerce Server tables, the above error will occur.
To change the default database for the Commerce Server DSN to the correct database, do the following:
- Open Control Panel.
- Double-click the ODBC Control Panel extension to launch the ODBC Administrator.
- Click the System DSN tab in the ODBC Administrator.
- Select the System datasource that is mapped to the Commerce Server database.
- Click the Configure button to launch the Microsoft SQL Server DSN Configuration wizard.
- Click the Next button twice.
- On the third page of the wizard, click the "Change the default database to:" checkbox, and then click on the dropdown list to select the Commerce Server database.
- Click the Next button twice, click Finish, and then click OK.
Re: Error Microsoft OLE DB Provider for ODBC Drivers
This may arise when the assigns permission are not correctly enabled, and to avoid this kind of problem you need to make sure permissions set to update/add files in the directory where you have stored the Access mdb file are granted. and to check that you need to ask your webhost
If there would be problem related to the connection string then you might be require to change it. Strip all but the DRIVER= and DBQ= part.
your default configuration may be set on ad2000.mdb if that doesn't work then try ad97.mdb. As the one host I installed AdMentor they claimed to support Access 2000 this may be their setting but you may get an error. But when i changed to ad97.mdb and it worked...
Re: Error Microsoft OLE DB Provider for ODBC Drivers
DSNs make code harder to maintain. Well, unless you can log into the ISP's machine with remote software, and to avoid this define your ODBC connection not with "Microsoft Access Driver" but with "Jet OLEDB Provider 4.0". So your connection string would look like this:
"Provider=Microsoft.Jet.OLEDB.4.0;Data source="C":\Backup\OBS\Development\Db\obs2k.mdb;Persist Security info="False""
If you use a DSN-Less connection. Otherwise its in the ODBC Settings.