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

Connecting to Access database

I am new to VB6.0. Can somebody give me the code to link VB6.0 to access. I have a form with a command button. An access table with 10 columns. I would like to display records if columns satisties a condition (for example "last name" is "Kumar" with their serial number) that is the final format must consists two rows "Serial Number" and all "first names" who "last name" is Kumar. can anybody help please. this is urgent.
Jul 24 '07 #1
2 1126
Macta
6
Use OLE. Create a linked or Embeded Object to Access using

OLE.CreateLinked
OR
OLE.CreateEmbed

I'll give you code.
Jul 25 '07 #2
You may Use ADODC for connection.. and datagrid for displaying the data in your form..

Right Click on General Tab then goto Components then check Microsoft ADO DATA 6.0 (SP4) (OLEDB)
and check also MIcrosoft Datagrid 6.0 (SP5) (OLEDB).. you may found the Step by step procedure on connecting database in ADODC in MSDN so I hope this could help you.. there's a lot of way in connecting VB6.0 in Access but ADODC is the Easiest way for the begginer like you..but there will be time for you to Know the Other Best Connection as of now Study the Basic..ok
Jul 25 '07 #3

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

Similar topics

4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
2
by: news | last post by:
We currently have our mySQL server on the same box as the Apache server. For security and load balancing, we're going to be moving the mySQL server to another box. We're already using a single...
1
by: Tim Dol | last post by:
I have inherited a VB6-SP5 program connecting to an Access 2000 database. I'm relatively new to VB/Access programming, so I may overlook something obvious. I'll try to explain the problem I can't...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
5
by: bill | last post by:
I am having difficulties connecting to a remote Sql server database in VB.net. Lets say my remote server is found at 255.255.255.255 and its name is MyServer. The database is called MyDatabase....
5
by: Sebastian | last post by:
I'm using the following code to connect to an access 2000 database. (with reference to adodb) Public DBvar As New ADODB.Connection() DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data...
5
by: Al | last post by:
Hi, I am looking for sample VB.net code for working with Access 97 database. I know how to work with SQL but I dont know how to read and writ into access 97. Any help is very much appreciated. ...
2
by: Patrick F | last post by:
Hi, i have SQL Server 2005 and a database set that is called, myCompany the problem is that i cant connect from my page to it, here is from the web.config: ( i have got this connectionstring from...
0
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've my win32 application which connecting to my sql database. till now i used MSDE as my database and now i want to upgrade to sql express 2005. after the upgrade i tried to connect to the...
1
by: Yew12 | last post by:
Hi, I'm having problems connecting to a Microsoft Access database. Im using PHP and ODBC but im not using a DNS. The scripts below give no errors but I they only give me a blank white screen. ...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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?

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.