Deploying VB .NET application WITH MS Access db

VB.NET

    Next

  • 1. Strong Names
    I have a major problem. I have a deadline of Monday and I don't know if I can do what I need to do. (darn Crystal Reports for not migrating to a different server!) I'm adding a reference to a COM control in VS. However, my assembly is signed with a strong name. When I attempt to compile the exe I get the error of "Unable to emit assembly: Referenced assembly 'Interop.SHDocVw' does not have a strong name" Is there a way I can tell the compiler to not check this dll for a strong name? Is there a way I can have VS generate this proxy WITH a strong name? Help is needed and appreciated. Thanks Scott
  • 2. Inheriting from UserControls
    I want a set of controls that all have a border, like a group box. I thought I would create a base control containing just a group box from which my set of controls could inherit. Assuming that this is the right approach (please tell me if it is not), how then do I make it so that the group box cannot be moved around on my set of controls, but is also able to act as container for other controls? If I leave the modifier of the group box as Friend, or Private, then the group box appears locked on the inheriting controls, but I cannot drop new controls onto it. If I change the modifier to Protected, Protected Friend, or Public, then I can drop controls onto the group box, but I can also move the group box around on the inheriting control. Is there something else I must do? TIA Charles
  • 3. Shared app.config
    This situation requres many exes to be sitting on a network share. I would like all of these to use the same app.config file, which will be stored in the same location on the network. A quick test though gave me this exception: System.InvalidOperationException: The key 'ConnectionString' does not exist in the appSettings configuration section. at System.Configuration.AppSettingsReader.GetValue(String key, Type type) at test_appconfig.Form1.FromApplicationConfig(String Key) in F:\VB.NET\junk\test_appconfig\test_appconfig\Form1.vb:line 62 The program '[2808] test_appconfig.exe' has exited with code 0 (0x0). What's the best way to share the app.config in this common network folder? Thanks, Eric Public Function FromApplicationConfig(ByVal Key As String) As String Try Dim reader As New AppSettingsReader Return CStr(reader.GetValue(Key, GetType(String))) Catch ex As Exception MessageBox.Show(ex.Message.ToString & vbCrLf & _ ex.Source.ToString & vbCrLf & _ ex.StackTrace.ToString, "Function: FromApplicationConfig Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End Try End Function
  • 4. The Pipe Symbol
    Alright, I am a long time Access user, got into development with Access for work, now I am a junkie. My latest venture is into VB.net. So far I love it. However, I am doing one of those 20 one hour lesson books, and on lesson one I am stuck. How do you make a pipe symbol. I don't see it on my key board???? Please help Thanks Gary

Deploying VB .NET application WITH MS Access db

Postby JOHN MALONEY » Sun, 08 Jan 2006 11:04:31 GMT

This is a multi-part message in MIME format.


Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get the deployment to work right. I have added a SetUp project to the existing application. I also selected RELEASE as appropriate in the Application Folder and on the Users Desktop and Start menu. I didn't know whether the Project Output though would be enough or whether I would need to add the .mdb file to the Application folder too. I tested the deployment both ways though and in each case, when the user installs the application, they can see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and changing the db's File Path to just the name of the db but that also didn't work??

It seems to me that I need to figure out how to stipulate where to install the db on the clients machine? If that is the case, I can just type that file path into my data class module (I think)!!

Thanks in advance!!

John
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi Everybody,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I have created a three-tiered db application in VB ..NET but I 
can't get the deployment to work right. I have added a SetUp project to the 
existing application. I also selected RELEASE as appropriate in the Application 
Folder and on the Users Desktop and Start menu. I didn't know whether the 
Project Output though would be enough or whether I would need to add the ..mdb 
file to the Application folder too. I tested the deployment both ways though and 
in each case, when the user installs the application, they can see my GUI...but 
nothing populates in the combo boxes on form_load??</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I also tried copying the .mdb file to the original projects 
BIN folder and changing the db's File Path to just the name of the db but that 
also didn't work??</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>It seems to me that I need to figure out how to stipulate 
where to install the db on the clients machine? If that is the case, I can just 
type that file path into my data class module (I think)!!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks in advance!!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>John</FONT></DIV></BODY></HTML>


Re: Deploying VB .NET application WITH MS Access db

Postby m.posseth » Sun, 08 Jan 2006 23:12:19 GMT

well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return 
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed  & 
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]









Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get the 
deployment to work right. I have added a SetUp project to the existing 
application. I also selected RELEASE as appropriate in the Application 
Folder and on the Users Desktop and Start menu. I didn't know whether the 
Project Output though would be enough or whether I would need to add the 
.mdb file to the Application folder too. I tested the deployment both ways 
though and in each case, when the user installs the application, they can 
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and 
changing the db's File Path to just the name of the db but that also didn't 
work??

It seems to me that I need to figure out how to stipulate where to install 
the db on the clients machine? If that is the case, I can just type that 
file path into my data class module (I think)!!

Thanks in advance!!

John 



Re: Deploying VB .NET application WITH MS Access db

Postby JOHN MALONEY » Mon, 09 Jan 2006 02:49:57 GMT

his is a multi-part message in MIME format.


Thanks very much for your HELP Michel,

Would you suggest that I post the code you mentioned in my data access class module?? I was thinking that I might be able to have the deployment include the installation of the .mdb file to the root of the C:// drive or something (but I didn't know how to configure the installation instructions). Either way, I will change the File Path in my current data access class and see if that helps? I will try your code in that class module this evening and let you know!! I guess where I'm having the difficulty is in figuring out where the deployment files go on the client and to code my data access class file path to agree with that path??

Thanks again!
--
John
"m.posseth" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ...
well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed &
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]





"JOHN MALONEY" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get the
deployment to work right. I have added a SetUp project to the existing
application. I also selected RELEASE as appropriate in the Application
Folder and on the Users Desktop and Start menu. I didn't know whether the
Project Output though would be enough or whether I would need to add the
.mdb file to the Application folder too. I tested the deployment both ways
though and in each case, when the user installs the application, they can
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and
changing the db's File Path to just the name of the db but that also didn't
work??

It seems to me that I need to figure out how to stipulate where to install
the db on the clients machine? If that is the case, I can just type that
file path into my data class module (I think)!!

Thanks in advance!!

John


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Thanks very much for your HELP Michel,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Would you suggest that I post the code you mentioned in
my data access class module?? I was thinking that I might be able to have the
deployment include the installation of the .mdb file to the root of the
C:// drive or something (but I didn't know how to configure the installation
instructions). Either way, I will change the File Path in my current data
access class and see if that helps? I will try your code in that class module
this evening and let you know!! I

Re: Deploying VB .NET application WITH MS Access db

Postby m.posseth » Mon, 09 Jan 2006 17:40:32 GMT

Hello John ,,



yes  it is alwaysbetter to use a sub directory under your assembly path as 
the data directory
there are even ocasions wwre users have messed up there file system ( 
partitioning , changing harddisks) and do not even have a C:\ disk
with the described code you can determine the assembly path  and so discover 
the data dir

regards

Michel Posseth [MCP]







Thanks very much for your HELP Michel,

Would you suggest that I post the code you mentioned in my data access class 
module?? I was thinking that I might be able to have the deployment include 
the installation of the .mdb file to the root of the C:// drive or something 
(but I didn't know how to configure the installation instructions). Either 
way, I will change the File Path in my current data access class and see if 
that helps? I will try your code in that class module this evening and let 
you know!! I guess where I'm having the difficulty is in figuring out where 
the deployment files go on the client and to code my data access class file 
path to agree with that path??

Thanks again!
-- 
John




  well i use this


  Friend Shared ReadOnly Property Assemblypath() As String

  Get

  Return
  Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

  End Get

  End Property

  Me.Datasource = Path.Combine(Assemblypath, strDatasource)


  strdatasource can be "\DATA\YOURDB.MDB"

  so this results in the folowing path being built

  full location path were your assembly is beeing deployed  &
  "\DATA\YOURDB.MDB"


  hth

  Michel Posseth [MCP]









  Hi Everybody,

  I have created a three-tiered db application in VB .NET but I can't get 
the
  deployment to work right. I have added a SetUp project to the existing
  application. I also selected RELEASE as appropriate in the Application
  Folder and on the Users Desktop and Start menu. I didn't know whether the
  Project Output though would be enough or whether I would need to add the
  .mdb file to the Application folder too. I tested the deployment both ways
  though and in each case, when the user installs the application, they can
  see my GUI...but nothing populates in the combo boxes on form_load??

  I also tried copying the .mdb file to the original projects BIN folder and
  changing the db's File Path to just the name of the db but that also 
didn't
  work??

  It seems to me that I need to figure out how to stipulate where to install
  the db on the clients machine? If that is the case, I can just type that
  file path into my data class module (I think)!!

  Thanks in advance!!

  John




Re: Deploying VB .NET application WITH MS Access db

Postby JOHN MALONEY » Mon, 09 Jan 2006 21:49:41 GMT

his is a multi-part message in MIME format.


Thanks again Michel,

I was able to get my project deployed just by setting up the correct file path! I can see though that your code would be better because it allows the configuration to occur wherever the user wants and the db is still added on correctly!

--
John Maloney
UOP Online Faculty
XXXX@XXXXX.COM
XXXX@XXXXX.COM (alternate)
(954) 441-5091
"m.posseth" < XXXX@XXXXX.COM > wrote in message news:ult$ XXXX@XXXXX.COM ...
Hello John ,,

>>Would you suggest that I post the code you mentioned in my data access
>>class module??


yes it is alwaysbetter to use a sub directory under your assembly path as
the data directory
there are even ocasions wwre users have messed up there file system (
partitioning , changing harddisks) and do not even have a C:\ disk
with the described code you can determine the assembly path and so discover
the data dir

regards

Michel Posseth [MCP]



"JOHN MALONEY" < XXXX@XXXXX.COM > wrote in message
news:% XXXX@XXXXX.COM ...
Thanks very much for your HELP Michel,

Would you suggest that I post the code you mentioned in my data access class
module?? I was thinking that I might be able to have the deployment include
the installation of the .mdb file to the root of the C:// drive or something
(but I didn't know how to configure the installation instructions). Either
way, I will change the File Path in my current data access class and see if
that helps? I will try your code in that class module this evening and let
you know!! I guess where I'm having the difficulty is in figuring out where
the deployment files go on the client and to code my data access class file
path to agree with that path??

Thanks again!
--
John
"m.posseth" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed &
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]





"JOHN MALONEY" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get
the
deployment to work right. I have added a SetUp project to the existing
application. I also selected RELEASE as appropriate in the Application
Folder and on the Users Desktop and Start menu. I didn't know whether the
Project Output though would be enough or whether I would need to add the
.mdb file to the Application folder too. I tested the deployment both ways
though and in each case, when the user installs the application, they can
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and
changing the db's File Path to just the name of the db but that also
didn't
work??

It seems to me that I need to figure out how to stipulate where to install

Similar Threads:

1.Converting MS Access 2000 application to a VB / VB.NET application

Hello All

I am trying to convert a MS Access 2000 application to a VB application
(Just Started Yesterday)

I am using Visual Studio .NET 2003 utilizing Visual Basic .NET

I think I have a good feel to what I have to do, but does anyone know of a 
GOOD white paper on what is involved, pitfalls, etc?

So far I have run into one problem that I have not been able to figure away 
around.
That is how to access the tables.  In access you have Database objects, 
Recordset objects and all if the associated methods.  I cant seem to find out 
how to convert this to VB.  I have been reading through postings in this 
Discussion Group, but I am still a little bit confused.

Is there a SIMPLE way to access the existing .MDB database tables, and the 
individual fields within the tables.  Any help would be greatly appreciated, 
or a pointer to a good white paper describing the procedure.

Thanks in advance     

-- 
George H. Slamowitz
(602) 765-8111
(602) 765-8222 (FAX)

2.Problem Accessing an Access DB in an ASP.NET VB application

I'm building a very simple application using a data grid bound to an
Access DB using the usual DBAdapter, OleDBConnection, DataView, and
DataSet objects. All connections and tests work well until I try to
view the whole thing in IE. I then get the error messages below.

Line 145 is highlighted in red as specifically where the error is
occuring. I've gone through the security and permissions of the
Grid.mdb Access DB and checked every permission possible. Also, I do
not simultaneously have the Grid.mdb DB open in Access. No password is
needed to open the DB (password is set to blank). This is being run on
the same machine (my personal PC) on which it was developed where I am
the admin.

Thanks,

Kensei
---------------------------------------------------------
Line 143:    Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Line 144:        'Put user code to initialize the page here
Line 145:        OleDbDataAdapter1.Fill(MyDs1)
Line 146:        Page.DataBind()
Line 147:    End Sub
 

Source File: c:\inetpub\wwwroot\GridTest\WebForm1.aspx.vb    Line: 145

Stack Trace: 


[OleDbException (0x80004005): The Microsoft Jet database engine cannot
open the file 'C:\Inetpub\wwwroot\GridTest\Grid.mdb'.  It is already
opened exclusively by another user, or you need permission to view its
data.]
   System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
   System.Data.OleDb.OleDbConnection.InitializeProvider() +57

3.Unable to access the VB.NET application deployed through Terminal Services

4.Example code to create an MS Access db locally using VB.Net 2003

Hi, 

I am a beginner looking for example code on how to create an access
database for a local application. I need to create the database when
the app is first installed. I can do it with SQL 2000 but I am not
sure how to do create a db, tables and fields as a local mdb. Any help
or pointers to where I can find example code on this much appreciated.

Thanks
John

5.connectiing to a secured MS Access DB from VB.NET

6. Using ".OpenCurrentDatabase" in VB .net to open an MS Access DB



Return to VB.NET

 

Who is online

Users browsing this forum: No registered users and 74 guest