473,785 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# - ADODB - Failure to connect on deployment

Hi

I have an application that connects to a SQl database on my computer
via an ADODB connection:

ADODB.Connectio n Conn = new ADODB.Connectio n();

Conn.Connection String = ("Driver={SQ L
Server};Server= 4P-12.Leighton.loc al;Database=HD; Uid=l0073;Pwd=c heese");

Conn.Open(dbcon nection, "", "", -1);

ADODB.Recordset rs = new ADODB.Recordset ();
rs.Open("SELECT * from [HD-Users]", Conn,
ADODB.CursorTyp eEnum.adOpenSta tic,
ADODB.LockTypeE num.adLockBatch Optimistic, 1);

This works fine when running from the code, or even deploying it and
installing on my machine.

However whenever i install it on someone elses machine, it installs
fine, but when it gets to the part where it connects to the DB it fails
and says "Invalid connection string attribute"

Ive been looking about the net and all i really found was that in
c:\windows\asse mbly i have something called ADODB, but this isnt
present on the other machines ive installed it on.

Any ideas?

Nov 23 '05 #1
4 5511
Give ur server IP instead of host name

"Ames111" wrote:
Hi

I have an application that connects to a SQl database on my computer
via an ADODB connection:

ADODB.Connectio n Conn = new ADODB.Connectio n();

Conn.Connection String = ("Driver={SQ L
Server};Server= 4P-12.Leighton.loc al;Database=HD; Uid=l0073;Pwd=c heese");

Conn.Open(dbcon nection, "", "", -1);

ADODB.Recordset rs = new ADODB.Recordset ();
rs.Open("SELECT * from [HD-Users]", Conn,
ADODB.CursorTyp eEnum.adOpenSta tic,
ADODB.LockTypeE num.adLockBatch Optimistic, 1);

This works fine when running from the code, or even deploying it and
installing on my machine.

However whenever i install it on someone elses machine, it installs
fine, but when it gets to the part where it connects to the DB it fails
and says "Invalid connection string attribute"

Ive been looking about the net and all i really found was that in
c:\windows\asse mbly i have something called ADODB, but this isnt
present on the other machines ive installed it on.

Any ideas?

Nov 23 '05 #2
Ok i changed it to the IP address but its timing out. i Also simplified
the connection to

ADODB.Connectio n Conn = new ADODB.Connectio n();
Conn.Open("Driv er={SQL
Server};Server= xxx.xxx.xx.xx;D atabase=HD","l0 073", "cheese",-1);
ADODB.Recordset rs = new ADODB.Recordset ();
it seems to work on machines on the network that have ADODB in the
c:\windows\Asse mbly folder, and it doesnt work on machines that dont
have this.

Im pretty sure im deploying the application correctly, but im not sure
if its supposed to somehow put the ADODB 'THING' in the assembly folder

Nov 23 '05 #3
fixed now. To get the ADODB in assembly i had to install it throught
the office 2003 setup as part of the .net framework for office....or
summit, it works anyway. thanks for your help

Nov 23 '05 #4
A bigger question would be: why, in C#, are you using ADODB? You should
probably be using ADO.Net, which is accessed via the System.Data
namespace... this avoids the interop hop, the prerequisite of ADODB, and is
just quicker...

e.g. (using the SqlClient provider)

using (System.Data.ID bConnection conn = new
System.Data.Sql Client.SqlConne ction("your connection string")) {
conn.Open();
// and then use a data-reader or a data-set to get at your
data - see google...
}

"Ames111" <an*********@4p rojects.com> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com...
Ok i changed it to the IP address but its timing out. i Also simplified
the connection to

ADODB.Connectio n Conn = new ADODB.Connectio n();
Conn.Open("Driv er={SQL
Server};Server= xxx.xxx.xx.xx;D atabase=HD","l0 073", "cheese",-1);
ADODB.Recordset rs = new ADODB.Recordset ();
it seems to work on machines on the network that have ADODB in the
c:\windows\Asse mbly folder, and it doesnt work on machines that dont
have this.

Im pretty sure im deploying the application correctly, but im not sure
if its supposed to somehow put the ADODB 'THING' in the assembly folder

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2930
by: TK | last post by:
I have a problem getting ADOdb working with Oracle 9i. Before I tried to connect to Oracle, I successfully connected to an MS Access table via a DSN, and looped through all the records in that table, so I am pretty sure ADOdb is installed correctly, but I could be wrong. To connect to Oracle 9i, I first go in and un-comment extension=php_oci8.dll and extension=php_oracle.dll in the php.ini file, but when I do that, the CGI script always...
1
3529
by: liorh | last post by:
my code is using ADODB connection to connect to SQL (Virtual) Server. the way it being done is (c++): ADODB::_ConnectionPtr m_dbConn; ADODB::_RecordsetPtr m_dbRst; m_dbConn.CreateInstance(__uuidof(ADODB::Connection)); m_dbRst.CreateInstance( __uuidof( ADODB::Recordset )); m_dbConn->ConnectionString=( L"DSN=mydsn" ); m_dbConn->Open("","sa","",-1);
5
1275
by: DEWright_CA | last post by:
I have a app that I built for a client. I was able to deploy it to a test server without any real issue. I copied the bin folder to my server, copied over the aspx pages and made the virtual directory under IIS/5 executable. Everything worked great! Now I am trying to deploy the same app on a Windows 2003 server using the same methodology and I can't get it to function. I followed the same steps above and the basic pages load fine, but...
0
1532
by: Michael | last post by:
After a week of beating my head against a wall I still continue to receive the following error message when trying to deploy a package using the cabinet option. The same error occurs with a different "cabinet" name when using the setup file option. The file "_5F6C71C 2868460B5581E521727434428" cannot be installed because the file cannot be found in the cabinet file "SETUP.CAB". This could indicate a network error, an error reading...
6
5366
by: Wonder | last post by:
We have a VB.NET project with a reference to ADO 2.5 When I open it on my machine, I get the following build error: "The referenced component 'ADODB' has an updated custom wrapper available." When I double click on it, I get the following dialog appear: If I click 'No', for every object declared from the ADODB library, I get a build error as follows: "Reference required to assembly 'ADODB' containing the type 'ADODB.Connection'. Add...
0
2659
by: Marty Cruise | last post by:
I successfully deploy my application to 20 domain users. Only one new user is giving me a problem, although he can access all domain resources. When he clicks the installation link on the publish page, Framework 2.0 installs successfully, but then the application installation fails during the "Verifying Application Requirements" process. Can anyone help me figure out how to solve this? Error is as follows. PLATFORM VERSION INFO...
0
1234
by: =?Utf-8?B?R2lvdmFubmk=?= | last post by:
Hi, I am using VS 2005, .NET 2.0 and have the following problem: I have created a simple WinForms application and have added a reference to the ADO Interop PIA library;(ADODB.dll). When I add a Setup Package project, and add the "Primary Output", it does NOT detect that ADODB.dll is needed and thus does not get added to my deployment package making it unuseable to my end-users. Why does it not detect the presence of ADODB.dll? I...
7
2916
by: boyleyc | last post by:
Hi all I have written a database in access and used ADODB recordsets all the way through. The only recordsets that are not ADODB are the listbox navigation code automatically generated by access 2003 as follows : ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone
7
3500
by: trpost | last post by:
I just started using the php adodb library for my Oracle transactions, but am running into a problem when there are 2 simultaneous requests going on at the same time. The nature of the php app that I created is it runs a large query that takes approximately 15 seconds to run and then prints the data out on a web page. If I open 2 separate browser windows and call the same report at about the same time, or while one report is...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.