473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Using ADODB in a Windows Form

I am trying to use ADO in a Windows form. It works as expected from the development computer running from Visual Studio. When I copy the exe to another computer, I get an error. Can someone either confirm this behavior or give me a way to solve problem. I posted this question before but got an answer that did not solve problem. Below are the exact steps that I performed from start of project to receipt of error.

(1) Open new Windows Application project in VS 1.1 on a development computer with XP Professional; (2) Add reference for C:\Program Files\Microsoft.NET\Primary Interop Assemblies\ADODB.dll; (3) Add line of code: Dim adoConn As New ADODB.Connection in the Declarations section of Form1.vb; (4) Compile in Release configuration; (4) Copy only file in bin folder (..\bin\winapp1.exe) from development computer to a laptop that contains Framework 1.1 and XP Home edition only; (5) launch the .exe on laptop. At this point I get "Application has generated...." error.

If I remark out the line of code in step #3 and repeat steps 4, 5, and 6, the form opens as expected on the laptop. Laptop is very new. Only preparation for executing .NET code was to download Framework 1.1. No other prep was performed on it.

Nov 20 '05 #1
3 1838
Have you installed MDAC on the laptop?

http://msdn.microsoft.com/data/Default.aspx
"genojoe" <ge*****@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
I am trying to use ADO in a Windows form. It works as expected from the development computer running from Visual Studio. When I copy the exe to
another computer, I get an error. Can someone either confirm this behavior
or give me a way to solve problem. I posted this question before but got an
answer that did not solve problem. Below are the exact steps that I
performed from start of project to receipt of error.
(1) Open new Windows Application project in VS 1.1 on a development computer with XP Professional; (2) Add reference for C:\Program
Files\Microsoft.NET\Primary Interop Assemblies\ADODB.dll; (3) Add line of
code: Dim adoConn As New ADODB.Connection in the Declarations section of
Form1.vb; (4) Compile in Release configuration; (4) Copy only file in bin
folder (..\bin\winapp1.exe) from development computer to a laptop that
contains Framework 1.1 and XP Home edition only; (5) launch the .exe on
laptop. At this point I get "Application has generated...." error.
If I remark out the line of code in step #3 and repeat steps 4, 5, and 6, the form opens as expected on the laptop. Laptop is very new. Only
preparation for executing .NET code was to download Framework 1.1. No other
prep was performed on it.

Nov 20 '05 #2
For starters; change your line of code to;

Try
Dim adoConn As New ADODB.Connection
Catch ex As Exception
MessageBox.Show(ex.Message, "ADO Error")
End Try

.... and compile as before. This at the very least should give you (and us)
a bit more of a clue...
_____________________________
The Grim Reaper

"genojoe" <ge*****@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
I am trying to use ADO in a Windows form. It works as expected from the development computer running from Visual Studio. When I copy the exe to
another computer, I get an error. Can someone either confirm this behavior
or give me a way to solve problem. I posted this question before but got an
answer that did not solve problem. Below are the exact steps that I
performed from start of project to receipt of error.
(1) Open new Windows Application project in VS 1.1 on a development computer with XP Professional; (2) Add reference for C:\Program
Files\Microsoft.NET\Primary Interop Assemblies\ADODB.dll; (3) Add line of
code: Dim adoConn As New ADODB.Connection in the Declarations section of
Form1.vb; (4) Compile in Release configuration; (4) Copy only file in bin
folder (..\bin\winapp1.exe) from development computer to a laptop that
contains Framework 1.1 and XP Home edition only; (5) launch the .exe on
laptop. At this point I get "Application has generated...." error.
If I remark out the line of code in step #3 and repeat steps 4, 5, and 6, the form opens as expected on the laptop. Laptop is very new. Only
preparation for executing .NET code was to download Framework 1.1. No other
prep was performed on it.

Nov 20 '05 #3
Problem is solved. I needed to copy the ADODB.DLL to the laptop and place it in the same folder as the exe. I guess I thought that the .DLL would have been part of the installation of Framework 1.1 on the laptop. It is not.

"genojoe" wrote:
I am trying to use ADO in a Windows form. It works as expected from the development computer running from Visual Studio. When I copy the exe to another computer, I get an error. Can someone either confirm this behavior or give me a way to solve problem. I posted this question before but got an answer that did not solve problem. Below are the exact steps that I performed from start of project to receipt of error.

(1) Open new Windows Application project in VS 1.1 on a development computer with XP Professional; (2) Add reference for C:\Program Files\Microsoft.NET\Primary Interop Assemblies\ADODB.dll; (3) Add line of code: Dim adoConn As New ADODB.Connection in the Declarations section of Form1.vb; (4) Compile in Release configuration; (4) Copy only file in bin folder (..\bin\winapp1.exe) from development computer to a laptop that contains Framework 1.1 and XP Home edition only; (5) launch the .exe on laptop. At this point I get "Application has generated...." error.

If I remark out the line of code in step #3 and repeat steps 4, 5, and 6, the form opens as expected on the laptop. Laptop is very new. Only preparation for executing .NET code was to download Framework 1.1. No other prep was performed on it.

Nov 20 '05 #4

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

Similar topics

0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
0
by: Channing Jones | last post by:
Hello everyone, I am trying to store data in a binary field of an SQL-Server table using ADODB. So far, I have managed to store a record but not any data in the binary field. I only get...
2
by: Sam White | last post by:
I have set up a MySQL db on one server, IIS 6.0 on another. Using Frontpage I created some forms to input data. On a test page I made, I have 4 fields. First is the ID which is autonumber (I leave...
5
by: genojoe | last post by:
I have 2 computers (one with VS NET 1.1 and one with Framework 1.1 only) I have an application with a single form and a single line of user code. The line of code is: Dim adoConn As New...
1
by: genojoe | last post by:
I am trying to use ADO in a Windows form. It works fine from the development computer running from Visual Studio. When I copy the exe to another computer, I get an error. Can someone either...
6
by: Julien | last post by:
Hello, I have some files located in a file server and managed by a SQL database from a web based interface using ASP + VBSCRIPT technology. I need to automatically copy those files to a web...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
2
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following...
11
by: minishilpi | last post by:
I have a question - I have this code below to send an email and I have referenced the Microsoft CDO Library 2000. It doesn't throw any exception in the console window. It goes throughout the code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.