Recognize PC Name in VB6

I have an app that was written in vb6 years ago. I use the app on several different machines and I am wondering if there is a way that I can get it to recognize the name of the pc so I can access the sql server 2008 database regardless of which machine I am running it on (ie: "\PCName\SQLExpress". Or better yet, get at the local db without making a machine reference at all.

We use the software in remote locations that are not on a network. I will look at the previous solution. It looks like it might work. The only way to do something like "App.Path" would be to put the db in the same directory as the compiled application, right?

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:
ht…

As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…

This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.
This l…