Newbie Simple Quick Question

M

Mo

Hi,

I am working on an old ASP project and I need to make some changes to
it. the project files I have can not be opened with VB 2005 Express
edition. There are 3 sets of files in the project

*.vbp I assume this is the VB Project file
*.cls I assume these are the class files
Conn.bas it has two methods for setting and getting the connection
string and connection string const
proj1.DLL this is the compiled dll assembly

all classes are calling the methods in Conn.bas to get the connection
string. When the DLL is deployed through the component services,
proj1.DLL file is deployed along with Conn.bas file to the ASP
Server.

The question is under this scenario does the DLL dynamically calls the
Conn.bas to set the application conenction string or do I have to
compile it every time? I am told to simply edit the connection string
in the conn.bas file but I do not think this is correct. Any ideas is
greatly appreciated.

Thanks
 
M

Mr. Arnold

Mo said:
Hi,

I am working on an old ASP project and I need to make some changes to
it. the project files I have can not be opened with VB 2005 Express
edition. There are 3 sets of files in the project

*.vbp I assume this is the VB Project file
*.cls I assume these are the class files
Conn.bas it has two methods for setting and getting the connection
string and connection string const
proj1.DLL this is the compiled dll assembly

all classes are calling the methods in Conn.bas to get the connection
string. When the DLL is deployed through the component services,
proj1.DLL file is deployed along with Conn.bas file to the ASP
Server.

The question is under this scenario does the DLL dynamically calls the
Conn.bas to set the application conenction string or do I have to
compile it every time? I am told to simply edit the connection string
in the conn.bas file but I do not think this is correct. Any ideas is
greatly appreciated.

How does anyone here know what some DLL no one has written is suppose to do?
How does anyone here know about some .bas file that no one here has written
is suppose to do?

You don't even know what it's suppose to be doing.

You should be using the Web.config file that has the connection string in
it, if this is an ASP.NET solution.

What kind of ASP and VB solution is this? It doesn't seem to be an ASP.NET
solution and must be some non ASP.NET and non VB.NET solution.

You may need to use InterDev 6.0 and VS 6.0 in order to work with this
solution or convert the solution over to a .Net solution, doing a possible
re-write.
 
M

Mo

You are very observant!! Obviously if I knew what I am dealing with I
did not have to deal with your B.S. You are correct, somebody wrote
this a long time ago probably in VB6. I do not have the complete
source code and the project does not convert to .net platform using
VS2005.

Let me rephrase the question. Is it possible in a VB6 project to
compile a project having the resulting DLL file use a .bas file as a
class to manage database link configuration? Let's say the resulting
dll is looking for a class XX which is in the local directory in
a .bas file. Is the compiler smart enough to recognize the file as
having the class it is looking for or once you compile the code
executes only the classes and methods defined in the dll and does not
bind to any class residing in an external file?

Thanks
 
R

Rory Becker

You are very observant!! Obviously if I knew what I am dealing with I
did not have to deal with your B.S. You are correct, somebody wrote
this a long time ago probably in VB6. I do not have the complete
source code and the project does not convert to .net platform using
VS2005.

Let me rephrase the question.

First of all you should really be asking this question in a VB6 newsgroup.
This one is for VB.Net. Many (posssibly most) people here are lucky enough
to have never had to deal with Vb6 and therefore you would be extremely lucky
to find someone willing and able to answer a vb6 question.
Is it possible in a VB6 project to
compile a project having the resulting DLL file use a .bas file as a
class to manage database link configuration?

You seem to be asking if a compiled code (the Dll) can execute uncompiled
code (the bas file).
This might be possible using scripting.

-------------------------------------------------------------
Sidenote: However taking a step further back, you appear to want to be able
to configure a connection string outside of you compiled dll and have the
app capable of reading this information from some external file.

You might want to look into ODBC Datasources and DSNs

This should allow you to reference a named datasource and change the definition
of that datasource externally to your program.
-------------------------------------------------------------
Let's say the resulting
dll is looking for a class XX which is in the local directory in
a .bas file.
Is the compiler smart enough to recognize the file as
having the class it is looking for or once you compile the code
executes only the classes and methods defined in the dll and does not
bind to any class residing in an external file?

I must admit I'm getting rather confused as to what you're trying to achieve.
It now seems you might be asking if the compiler looks at all files in a
directory when it is building an exe or dll.

This is not the case. It only builds files listed in the vbp file. This is
a "Visual basic project" file which lists everything about the project not
explicitly held in the code files. (There are other files but not all are
consulted by the compiler)

Hopefully this has been of some use to you although my Vb6 is really rusty.

If this does not help, (and even if it does) you should perhaps reask your
question in a more suitable location to people more knowledgable on the topic
in question.

Perhaps one of the microsoft.public.vb.* newsgroups
 
R

Rory Becker

Thank you Rory, You have answered my question.

Happy to help.

Glad some of that was useful :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top