473,385 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How would I connect my access to vb?

84
how would I connect my access in my vb?
Sep 13 '06 #1
1 3331
Reena83
32
how would I connect my access in my vb?
Example:

In your Main Module: (declare general declarations)

Option Explicit
'declare global variable
Public cnnDb As New ADODB.Connection


Sub Main()
'change into the project directory
ChDrive Left(App.Path, 2)
ChDir Mid(App.Path, 3)

'open the database
cnnDb.Open "Provider = Microsoft.Jet.OLEDB.3.51;" _
& "Data source = Babylon.mdb"
MsgBox ("Connection is now open")

'load the main form
frmInvoiceView.Show 1

'close the database
cnnDb.Close
MsgBox ("Connection is now closed")

End Sub
Sep 21 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

22
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs...
0
by: chris | last post by:
Hi, I try to connect to Access with php with te code below. The database and table are ok. <?php include('../adodb/adodb.inc.php'); $db =& ADONewConnection('access'); $dsn =...
5
by: Kona | last post by:
Hello, Is it right to tell that DB2 Connect has the same function that Oracle Net ? If I have an ODBC application is it also right to tell that I have 2 possibilities on my client workstation to...
11
by: Marcus | last post by:
Hello! I'm trying to write a VB.NET program that connects to a AS/400 Server. I've tried almost everything, but it will not connect. I've tried to set up a DSN using the Client Access...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
1
by: Dave | last post by:
I am trying to learn .NET with the standard edition of VC++.NET 2003 Standard edition. When I use the wizard in the toolbox to connect to a non-microsoft ODBC data source, I get the error message...
3
by: Laurence | last post by:
Hi there, Does somebody know the efficent way to connect DB2/400? Through iSeries Access ODBC/OLEDB driver or DB2 Connect? Which will more fast and efficent? In addition, does DB2 Connect use...
2
by: vikas.bhatia | last post by:
Is this still true? http://groups.google.com/group/comp.databases.ibm-db2/browse_thread/thread/58c6c36ce9006d50/778f98749d8e2983?lnk=st&q=DB2+Connect+product+license&rnum=6#778f98749d8e2983 would...
6
by: Al G | last post by:
Can someone tell me what I need to get connected to our AS400? I am trying to write an app in VS2005(Data source, Gridview) that requires data from files on our AS400. I've downloaded DB2, and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.