PDA

View Full Version : ODBC help needed



groston
08-26-2010, 09:47 PM
I have a MS Word application which uses a DSN-less connection to access a remote SQL database. (See details below.) When I last used this application a year ago (on a XP Pro machine with Office 2003), it ran fine. The exact same application no longer runs - its give the following error:

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

I have tried this application on three machines: Win7 x64/Office 2010 (32 bit); XP Pro/Office 2003; and XP Pro/Office 2007 and have gotten the same error each time.

Here is the relevant code:
Dim cn As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
cn.ConnectionString = "Driver={SQL Native Client};Server=<ip_address>;Database=<db>;Uid=<uid>;Pwd=<pwd>"
cn.CursorLocation = adUseClient
cn.Open

Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cn
cmd.CommandText = "sp_name"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("@Param", adChar, adParamInput, 25, "Value")
Set rs = cmd.Execute
Since the application did not change - the date stamp on the .doc file is last August - I do not know what to look for in order to resolve the problem. Can anyone please suggest an approach?

Tinbendr
08-27-2010, 05:10 AM
I suspected a Windows security update and I was close.

Read here (http://forums.devarticles.com/microsoft-sql-server-5/data-source-name-not-found-and-no-default-driver-specified-8346.html).

BTW, I just searched using the error string and found this.

David

Arvin27
08-31-2010, 03:01 AM
Diesel T-Talla Polo Shirt from extreme mmaDiesel provides you great variety of garments which are liked all over the world. As diesel has gained great fame and reputation in the world due to which most of the people recommend Diesel garments. Diesel T-Talla Polo Shirt is also famous due to its designs and style. These shirts are made up of 100% cotton and easily available from different markets and shop at reasonable and affordable prices. You can also get these Diesel T-Talla Polo Shirts online. You can find thousands of sites which may help you in finding the best quality Diesel Polo Shirt. You can also find embroidery and designs on the shirts which really attract the people and you feel cool and calm. You can find wholesale prices on the online shop. The price of the Polo T-Shirt is not more then $70. So, you can easily get these T-Shirt on wholesale prices

fumei
08-31-2010, 12:25 PM
Moderator, can we get rid of the above person please? They have posted on another thread as well.

groston
09-06-2010, 04:04 PM
David,

Sorry about the long silence. Yes, I concur with you that the issue might be a security update, but I saw nothing related to that on the page you referenced. Could you be more specific? Thanks!

Tinbendr
09-07-2010, 09:33 AM
The posters at that link talk about using a 32-bit vs 64-bit ODBC and that updating the driver might help.

Other than that, I can't offer any more assistance.

You might post this in the Access forum (please link to this message) and get some help there.