5 Replies - 198 Views - Last Post: 12 September 2011 - 09:29 AM Rate Topic: -----

#1 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 43
  • View blog
  • Posts: 777
  • Joined: 16-September 09

Writing a program that accesses DB's on one comp with a diff name

Posted 12 September 2011 - 08:07 AM

hey guys!

i hope this makes sense....

I've written bunches of programs and I'm getting ok at this but everything i've ever done was just run on my local machine at work or from the network. In this case I'm writing a program that I'm going to get an installer for and distribute to people. It's more like a project of mine right now but you never know. at any rate, I'm doing things like creating my database connections...

ie(which btw is erroring out and this is my first time with access2010/vb2008 but i'll fix that hopefully)
Conn.Open("Provider =Microsoft.Jet.OLEDB.4.0; Data Source =C:\Users\Jimmy\Desktop\programming\Sales Retention\DBs\Logins.accdb; Jet OLEDB:Database Password =kapfft;")



my question is, how do i write it so it works right on the comps that get it? is this something that a good installer can take care of or is there something new i should be doing in these cases where I have to reference permanent files?

As always, thanks in advance!!!

This post has been edited by guyfromri: 12 September 2011 - 08:07 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Writing a program that accesses DB's on one comp with a diff name

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6463
  • View blog
  • Posts: 23,499
  • Joined: 12-June 08

Re: Writing a program that accesses DB's on one comp with a diff name

Posted 12 September 2011 - 08:17 AM

You have to make your database available and open to the public. That means put it on a webserver or have public facing service that accesses the database. If this is going out to multiple people I would seriously suggest taking the time to bump this to MSSQL or MYSQL and *not* Access.
Was This Post Helpful? 0
  • +
  • -

#3 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 43
  • View blog
  • Posts: 777
  • Joined: 16-September 09

Re: Writing a program that accesses DB's on one comp with a diff name

Posted 12 September 2011 - 08:46 AM

I think i might look in to the mysql stuff here....it's something i've done with web apps but i've never used the windows/vb interface so this should be interesting...

my goal is to give my guys a program that can be run from a laptop with or without internet connectivity so if I switch it up to mysql here, is that more of a possibility?

Thanks for the input!
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6463
  • View blog
  • Posts: 23,499
  • Joined: 12-June 08

Re: Writing a program that accesses DB's on one comp with a diff name

Posted 12 September 2011 - 08:49 AM

Well that would be a problem then. If you want a universally public application you sort of need the internet for that.

If there is no internet connection is the app expected to still query some tables, or just store data?
Was This Post Helpful? 0
  • +
  • -

#5 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 43
  • View blog
  • Posts: 777
  • Joined: 16-September 09

Re: Writing a program that accesses DB's on one comp with a diff name

Posted 12 September 2011 - 09:04 AM

It's like a sales follow up tool...but it doesn't have to store data...basically it would be

John has the app so he can enter his clients, keep track of follow ups and get reminders plus log calls and notes.

Joe has the same capability but for his clients not global.

The information will all be stored on the local machine and never have to interact with other computers/versions of this app.

So that being said, is there a way to make my access work for that? (I'm actually playing with sql server 05 now but I'm still curious)

Thanks again!
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6463
  • View blog
  • Posts: 23,499
  • Joined: 12-June 08

Re: Writing a program that accesses DB's on one comp with a diff name

Posted 12 September 2011 - 09:29 AM

Ah.. okay that puts the application into perspective.

Heck, an XML file or attaching a 'MDB' file inside visual studios will do that.

Are you asking how to keep the database path the same? I would think of less hard coding and more flexible. One would figure the database would be in the same location as the executable - right?

Something like this would work:

System.Windows.Forms.Application.StartupPath
http://msdn.microsof...tuppath.aspx#Y0

Yeah, MSSQL would be great if there was need for a global database to access and interact with.. and it might not be a bad idea if you want to have the data in one spot... but this whole "no internet connectivity" throws a kink in the plan.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1