473,387 Members | 1,897 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,387 software developers and data experts.

how to connect ms access in visual bacis

1
i want to create a table in access using vb database connection and do manipulations in it


please help

M.R.AMARNATH
Oct 7 '06 #1
5 4742
vinci
62
helo friend!

you can use ADODB or ADODC to connect your database.
that is what am doing when i make connections.

you must first add MIcrosoft OLE data objects 2.8 (something like that) in your reference.
to add ADODC object, in your components you must check Microsoft active data objects. the adodc object will then be available in your toolbar.
then configure your adodc, you can use UDL, DSN (ODBC), or connection string.

bout adodb, you actually do codes for connections

Expand|Select|Wrap|Line Numbers
  1. 'sample:
  2.  
  3. dim con as ADODB.Connection
  4. dim rs as ADODB.Recordset
  5.  
  6. 'then to make the connection
  7.  
  8. con.open "Provider = Microsoft.Jet.OLEDB.4.0; data source = (place here the path of your database)"
  9.  
  10. ' with rs, this is where you write ur SQL
  11. ' sample
  12.  
  13. rs.open "SELECT * FROM TABLE_NAME", con, 3, 3
this is basically what i do with my connections...
hope this could help you...

just search the net about ADODC and ADODB...

enjoy programming!
Oct 8 '06 #2
joco
1
hlo vinci
what should i done to delete, update, save, edit
the files in connecting ms acces to visual basic.
can you give me a sample program?

mr. Joco Costanilla
Jun 22 '07 #3
hlo vinci
what should i done to delete, update, save, edit
the files in connecting ms acces to visual basic.
can you give me a sample program?

mr. Joco Costanilla
Please use ADOX. Here is a sample program. first reference to msadox.dll at sytem file and use the following code.
Expand|Select|Wrap|Line Numbers
  1. Sub AddTable(tablename As String)
  2. Dim tbl As New Table
  3.    Dim cat As New ADOX.Catalog
  4.         Dim idxNew As New ADOX.Index
  5.  
  6. 'Open the catalog.
  7.  
  8.    cat.ActiveConnection = ActconnectionSubject
  9.       tbl.Name = tablename
  10.  
  11.    tbl.Columns.Append "QN", adInteger
  12.    tbl.Columns.Append "ChapCode", adInteger
  13.  
  14.    tbl.Columns.Append "Question", adLongVarWChar
  15.    tbl.Columns.Append "OptionA", adLongVarWChar
  16.    tbl.Columns.Append "OptionB", adLongVarWChar
  17.    tbl.Columns.Append "OptionC", adLongVarWChar
  18.    tbl.Columns.Append "OptionD", adLongVarWChar
  19.    tbl.Columns.Append "CorrectAnswer", adInteger
  20. cat.Tables.Append tbl
  21. End Sub
Jun 22 '07 #4
Saf4
1
hi guys,

I was wandering if anyone could help me out im trying to connect my visual basic project to access databse table, where it has to check if the username and password exit can some one please help me out.
Nov 14 '07 #5
lotus18
866 512MB
hi guys,

I was wandering if anyone could help me out im trying to connect my visual basic project to access databse table, where it has to check if the username and password exit can some one please help me out.
http://www.thescripts.com/forum/thread733529.html
Nov 14 '07 #6

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

Similar topics

1
by: Linda Lee | last post by:
I purchased Visual Basic .NET version 2003 Standard I first try to connect Visual Basic .NET 2003 Standard to SQL Server 2000 Personal edition. When I go into Visual Basic .NET under Server...
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...
1
by: Zvonko Tusek | last post by:
Is there a way to use access database on web host (I have a web hosting account) in visual basic. I want to make Visual basic client applications that connect to internet and work with 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...
1
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hi, I am new here. I am facing a problem that I can't connect to MS Access with my Web application written in VB.Net. It gives me this kind of error: The Microsoft Jet database engine cannot...
2
by: http://www.visual-basic-data-mining.net/forum | last post by:
Say i have declare a module for connection and two buttons... one button has the method connect() and the other has the method disconnect().... how do i actually connect after i had disconnect...
1
by: perjorgen | last post by:
Hi, My asp.net can't connect to any sql database when running 1.1 I can connect to databases if I make a windows application and if if I run asp.net 2.0 Other computers have no problem...
4
by: chowdhury | last post by:
Hi, I am new in visual basic. i want to know how to connect and access data to MS Access or MS SQL database from a visual basic form.plz write me the code. Regards, chowdhury
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.