473,834 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Building a single EXE file in VB 2005?

We have been using VB6 to develop small custom apps that access an
Oracle database, in order to extend a larger product that is developed
by our colleagues in Germany (who use C++ and Java).

As each app is small and simple, we have been distributing each to the
customer in the form of a single EXE file.

I have been attempting to build another one of these small custom apps,
using VB 2005 Express Edition. It doesn't seem to be possible to
produce a single EXE file using this environment: for a start, there is
no File -> Make executable menu, only a more complex Build -> Publish
menu, which I think produces an MSI installer file. There are deeper
problems, however. Is there anything incorrect in my thinking below?

1) In order to write a program that takes the results of queries on an
Oracle database and places them in an Excel spreadsheet, in VB6, we can
use (COM) ADODB and Excel.Range.Cop yFromRecordset, which copies the
data in a single (fairly quick) step. The database facilities in
VB.NET provide no equivalent: we must instead write (slow and possibly
buggy) code that copies one row at a time from the query result into
the spreadsheet (see
<http://support.microso ft.com/?scid=kb;en-us;306022&spid= 1249&sid=global >),
or use (COM) ADODB.

2) If our code uses COM objects (eg ADODB in the above case), it isn't
possible to compile the app into a single EXE file. It seems that
VB.NET needs to create an Interop.ADODB.d ll file in this case.

I think if we want to continue to distribute single EXE files, it may
be best for us to stick with VB6.

Have I missed something?

Ashley.

Jun 26 '06 #1
7 12244
Hello ashley,

First, if you can't work the bugs out of a simple double loop perhaps you
should consider a different career path.
Second, the Express versions of the IDE are not for commercial use.
Third:

Set ExcelRowCounter
Set ExcelColumnCoun ter
Loop over each row
Loop over each column
Write Value to Excel Cell
Increment ExcelCellCounte r
Next
Increment ExcelRowCounter
Next

-Boo
We have been using VB6 to develop small custom apps that access an
Oracle database, in order to extend a larger product that is developed
by our colleagues in Germany (who use C++ and Java).

As each app is small and simple, we have been distributing each to the
customer in the form of a single EXE file.

I have been attempting to build another one of these small custom
apps, using VB 2005 Express Edition. It doesn't seem to be possible
to produce a single EXE file using this environment: for a start,
there is no File -> Make executable menu, only a more complex Build ->
Publish menu, which I think produces an MSI installer file. There are
deeper problems, however. Is there anything incorrect in my thinking
below?

1) In order to write a program that takes the results of queries on an
Oracle database and places them in an Excel spreadsheet, in VB6, we
can
use (COM) ADODB and Excel.Range.Cop yFromRecordset, which copies the
data in a single (fairly quick) step. The database facilities in
VB.NET provide no equivalent: we must instead write (slow and possibly
buggy) code that copies one row at a time from the query result into
the spreadsheet (see
<http://support.microsoft.com/?scid=k...=1249&sid=glob
al>),
or use (COM) ADODB.
2) If our code uses COM objects (eg ADODB in the above case), it isn't
possible to compile the app into a single EXE file. It seems that
VB.NET needs to create an Interop.ADODB.d ll file in this case.

I think if we want to continue to distribute single EXE files, it may
be best for us to stick with VB6.

Have I missed something?

Ashley.

Jun 26 '06 #2
Hello Boo...

Thanks for the reply. I don't see the need for your confrontational
tone -- although I realise that I didn't give any information about my
background, which hasn't helped. I did give a little detail recently
in another post here:
<http://groups.google.c o.uk/group/microsoft.publi c.dotnet.langua ges.vb/browse_frm/thread/3f0bd46d9cf7ee1 d?hl=en>.

I would prefer to avoid writing code to do this particular job in order
to minimise risk of bugs. I'm worried about typing issues, for
instance. If a well-tested library already exists to do this (which it
does in VB6), I'd prefer to use that.

I will check out the licensing limitations on the Express editions --
thank you.

There were other issues in my original posting. Does anyone have any
more feedback?

Ashley.

Jun 27 '06 #3
Ashley,

I think that most of us are not aware of a more suitable standard library
for your purpose in VB6.

Interop with Office has never been a simple job, all was it alone that the
development part of Office has showed in past in a way its own standards of
programming to the world.

But it is as well not so impossible to do as you show.

There is a special Office Net addition in Visual Studio which is standard in
more expensive versions.
See in this link what is included in the Express version.

http://msdn2.microsoft.com/en-us/library/b4z62wxz.aspx
However in this sample set is as well a sample how to automate office, I
have the idea that it will go in the Express version as well, because it are
older samples. (I don't guarantee that).

http://www.microsoft.com/downloads/d...displaylang=en

I hope this helps,

Cor
<as*********@gm ail.com> schreef in bericht
news:11******** **************@ c74g2000cwc.goo glegroups.com.. .
Hello Boo...

Thanks for the reply. I don't see the need for your confrontational
tone -- although I realise that I didn't give any information about my
background, which hasn't helped. I did give a little detail recently
in another post here:
<http://groups.google.c o.uk/group/microsoft.publi c.dotnet.langua ges.vb/browse_frm/thread/3f0bd46d9cf7ee1 d?hl=en>.

I would prefer to avoid writing code to do this particular job in order
to minimise risk of bugs. I'm worried about typing issues, for
instance. If a well-tested library already exists to do this (which it
does in VB6), I'd prefer to use that.

I will check out the licensing limitations on the Express editions --
thank you.

There were other issues in my original posting. Does anyone have any
more feedback?

Ashley.

Jun 27 '06 #4
ljh
Ashley,

I make no bones about it.......in comparing VB.Net to Visual Basic 6, I
think VB.Net is a huge step backwards. It made the easy stuff easier and
the hard stuff harder. Not a great accomplishment if you ask me. VB.Net
was written for Microsoft - not for developers. It solves internal problems
for MS while creating problems for developers. It is the single, largest
screw-up in the history of programming languages.

You are not going to have a "small and simple" application using VB.Net. It
will not be small because you cannot depend on the end user having .Net 2.0
installed. That will add 25 MB to your installation. This significantly
increases bandwidth and distribution costs for you. (Don't even ask me why
MS can make BETA WGA - Windows Genuine Advantage - a critical security
download and not include the .Net runtime as a critical OS update...seeing
as how .Net is their strategy for the future.)

There is a way to make the installation simple and save some space while
including only the portions of .Net that your application needs. It is
called Thinstall.

Thinstall can wrap your entire project (including all needed portions of the
..Net framework) into a single, encrypted executable. Your customer does not
even need the .Net framework installed to use your Thinstall-wrapped app.
It has built-in licensing with the ability to distribute time-limited trials
of your software. It is a fantastic application for making no-install", but
Thinstall starts at $4,000 per application - so it will increase your
distribution costs.

There are similar (and much less expensive) applications that wrap VB6
applications into a single exe - just so you know.

As for what you are looking to do in .Net, I don't know if this will help -
but take a look at
http://www.xtremevbtalk.com/archive/.../t-239550.html. There is a
discussion of similar functionality there.

And, although we all know that VB6 was not perfect, VB.Net has more than its
share of problems. If you haven't already, subscribe to the free KB emails
at www.kbalertz.com. You can specify .Net 2.0 to limit the number of alerts
that you get and you can also search for all of the kb articles for .Net 2.0
right on the site.

IMHO, if what you have works, there is no reason to change to VB.Net. Don't
complicate something that is working. You won't gain any speed advantage.
Your distribution costs will increase. And, Microsoft is changing the
framework yet again with WinFX - now known as .Net 3.0 - and depending on
you to distribute it.

Jim Hubbard

<as*********@gm ail.com> wrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
We have been using VB6 to develop small custom apps that access an
Oracle database, in order to extend a larger product that is developed
by our colleagues in Germany (who use C++ and Java).

As each app is small and simple, we have been distributing each to the
customer in the form of a single EXE file.

I have been attempting to build another one of these small custom apps,
using VB 2005 Express Edition. It doesn't seem to be possible to
produce a single EXE file using this environment: for a start, there is
no File -> Make executable menu, only a more complex Build -> Publish
menu, which I think produces an MSI installer file. There are deeper
problems, however. Is there anything incorrect in my thinking below?

1) In order to write a program that takes the results of queries on an
Oracle database and places them in an Excel spreadsheet, in VB6, we can
use (COM) ADODB and Excel.Range.Cop yFromRecordset, which copies the
data in a single (fairly quick) step. The database facilities in
VB.NET provide no equivalent: we must instead write (slow and possibly
buggy) code that copies one row at a time from the query result into
the spreadsheet (see
<http://support.microso ft.com/?scid=kb;en-us;306022&spid= 1249&sid=global >),
or use (COM) ADODB.

2) If our code uses COM objects (eg ADODB in the above case), it isn't
possible to compile the app into a single EXE file. It seems that
VB.NET needs to create an Interop.ADODB.d ll file in this case.

I think if we want to continue to distribute single EXE files, it may
be best for us to stick with VB6.

Have I missed something?

Ashley.

Jun 27 '06 #5
"GhostInAK" <gh*******@gmai l.com> wrote in message
news:be******** *************** **@news.microso ft.com...
Second, the Express versions of the IDE are not for commercial use.


Not sure where you got that idea. From the FAQ for the express editions:

"4. Can I use Express Editions for commercial use?
Yes, there are no licensing restrictions for applications built using the
Express Editions"

Link: http://msdn.microsoft.com/vstudio/ex...t/faq/#general

/claes

Jun 27 '06 #6

"Claes Bergefall" <lo*****@nospam .nospam> wrote in message
news:Ou******** ********@TK2MSF TNGP02.phx.gbl. ..
"GhostInAK" <gh*******@gmai l.com> wrote in message
news:be******** *************** **@news.microso ft.com...
Second, the Express versions of the IDE are not for commercial use.


Not sure where you got that idea. From the FAQ for the express editions:

"4. Can I use Express Editions for commercial use?
Yes, there are no licensing restrictions for applications built using the
Express Editions"

Link: http://msdn.microsoft.com/vstudio/ex...t/faq/#general


He probably meant "not for commercial use" as in XP Home is not (intended) for
commercial use, XP Pro is.
Jun 27 '06 #7
Hi Ashley,

I ran into the same Excel issue using adClipString with VB6.
It was so easy passing a recordset to Excel as a display interface for SQL
queries.

The work around I came up with for VB.Net was to issue a SQL query, parse
all field headings with VbTab, and then parse the returned fields for each
row.
The output is wrtten to a file, for which I then call Excel to display.
(It was only a couple of lines of code. See below)

Also, I've read that you can call old ADO recordset code from VB.Net by
setting a certain type of reference, so that you could use your current code
under VB.Net.
I just haven't tried it yet, because of the easy workaround listed below.

Something like:
sData = ""
strSQL = "select * from DBA_HIST_Librar yCache"
Get_Field_Value s()
'oWrite = oFile.AppendTex t("C:\OracleAwr Data.xls")
oWrite = oFile.("C:\Orac leAwrData.xls")
oWrite.WriteLin e(sData)
oWrite.Close()

Shell("C:\\Prog ram Files\\Microsof t Office\\OFFICE1 1\\Excel.exe " & _
Chr(34) & "C:\OracleAwrDa ta.xls" & Chr(34), vbMaximizedFocu s)

Private Sub Get_Field_Value s()

selectedDatabas e = cmbServers.Item s.Item(itemCoun tPointer)

Dim cnDBMS As New OleDbConnection
cnDBMS.Connecti onString = "Provider=msdao ra;Data Source=" &
selectedDatabas e & ";User Id=" & txtUserID.Text & ";Password= " &
txtPassword.Tex t & ";"

cnDBMS.Open()

Dim cmDBMS As New OleDbCommand(st rSQL, cnDBMS)

Dim rdrDBMS As OleDbDataReader

rdrDBMS = cmDBMS.ExecuteR eader(CommandBe havior.CloseCon nection)

iFieldCount = rdrDBMS.FieldCo unt
sHeadingFlag = "N"

Do While rdrDBMS.Read()
If sHeadingFlag = "N" Then
sHeadingFlag = "Y"
For I = 0 To iFieldCount - 1
sData = sData & rdrDBMS.GetName (I) & vbTab
Next
sData = sData & vbCr
End If
For I = 0 To iFieldCount - 1
'sData = sData & selectedDatabas e & vbTab &
CStr(Date.Now.T oShortDateStrin g) & vbTab & CStr(Date.Now.T oShortTimeStrin g) &
vbTab
sData = sData & CType(rdrDBMS.G etValue(I), String) & vbTab
Next
sData = sData & vbCr
Loop

cnDBMS.Close()

End Sub
--
Joseph Karpinski
"as*********@gm ail.com" wrote:
We have been using VB6 to develop small custom apps that access an
Oracle database, in order to extend a larger product that is developed
by our colleagues in Germany (who use C++ and Java).

As each app is small and simple, we have been distributing each to the
customer in the form of a single EXE file.

I have been attempting to build another one of these small custom apps,
using VB 2005 Express Edition. It doesn't seem to be possible to
produce a single EXE file using this environment: for a start, there is
no File -Make executable menu, only a more complex Build -Publish
menu, which I think produces an MSI installer file. There are deeper
problems, however. Is there anything incorrect in my thinking below?

1) In order to write a program that takes the results of queries on an
Oracle database and places them in an Excel spreadsheet, in VB6, we can
use (COM) ADODB and Excel.Range.Cop yFromRecordset, which copies the
data in a single (fairly quick) step. The database facilities in
VB.NET provide no equivalent: we must instead write (slow and possibly
buggy) code that copies one row at a time from the query result into
the spreadsheet (see
<http://support.microso ft.com/?scid=kb;en-us;306022&spid= 1249&sid=global >),
or use (COM) ADODB.

2) If our code uses COM objects (eg ADODB in the above case), it isn't
possible to compile the app into a single EXE file. It seems that
VB.NET needs to create an Interop.ADODB.d ll file in this case.

I think if we want to continue to distribute single EXE files, it may
be best for us to stick with VB6.

Have I missed something?

Ashley.

Jul 6 '06 #8

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

Similar topics

0
1744
by: PatchFactory Support | last post by:
Description: Professional and easy-to-use patch building environment that can help you to create instant patch packages for software and file updating. Generated patch packages are small size self-extracting executable update programs in a famous installer style with adjustable user-friendly interface and multilingual support. Enhanced with features like easy-to-use interface including a Wizard mode, powerful patch engine, integrated...
9
2347
by: Jenta | last post by:
A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals... ...and Online Registration is now available if you plan to table and participate in the International Grassroots Exhibition: http://www.lfhniivaaaa.info/awbcgrassrootsofpeace We would greatly like some proposals from all people worldwide, especially
1
2725
by: Asim Jalis | last post by:
Building a Single Assembly DLL with C# and C++ Code I am trying to create a single assembly composed of managed C++ and C# code, and I want to do this on the command line. I have confirmed that I can do this in Visual Studio 2005 using the steps described here: http://blogs.msdn.com/frankpr/archive/2004/07/27/198918.aspx Question: How can I do this on the command line? What is Visual
4
1419
by: Steve Jorgensen | last post by:
A while ago, I posted a 1/2 formed idea for what was probably an overcomplicated scheme for improving how we create content using the DOM API. Since then, I've been refactoring some real-world code that builds content with DOM, and have come up with a much simpler, more practical idea that I've had success in implementing. The problem in a nutshell is that, to build a tree or fragment in the DOM, it's just about impossible to arrange the...
8
1997
by: Jacob Arthur | last post by:
How would I go about using a custom select string that is passed from a form to the SelectCommand parameter of SqlDataSource? I tried: SelectCommand = "<% Request.Form("hdnSelect") %>" but I got an error about putting <% %> tags in a literal. I tried taking out the quotes (the " ") and it didn't do any good. I'm trying to use the built in ASP.NET 2.0 DataList control, but I haven't come up with anything.
4
1582
by: Dariusz Tomon | last post by:
Hello I have got windows application project (C# Visual Studio 2003) with references to external dlls. All I want is to compile everything into one exe file, so that I can send it to another machine and it works. I would also ask about creating installation package so that others could install my application. Best Regard
3
1753
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries. See below for a detail description. Preparing resources...
2
1339
by: magic kat | last post by:
I am working on a web based asp.net 2.0 project that began as an application in Visual Studio 2005. The web site appears to work okay, but when we attempt to build it, we get all sorts of errors. The answer I get from the developer is "don't build it". I am not so sure this is a good idea, isn't that the whole idea, that building it gives us any errors that are bound to come haunt us somewhere down the line. What do you think the...
4
3359
by: ramshankaryadav | last post by:
Hi, I'm facing a problem while building a project through MSBuild, this project is a part of a solution which has several other projects on which it depends, but I want to build this project without building it's dependencies. We can do this for a solution by unselecting projects through Configuration Manager under solution properties, but how to achive same for a project!
0
9799
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9646
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10795
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10512
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...
0
9332
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7760
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
5627
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4427
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
3
3083
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.