Solved

Visual Basic and CE Database

Posted on 2001-06-20
6
321 Views
Last Modified: 2013-12-27
Can someone post some sample code to access a database on a windows CE based machine.
I have the database and application residing in the same location(maybe that is the problem)

I would like to know how to connect to the database with the adodce reference.

I need to be able to extract data out to fill a combo box and then also insert data collected from two text fields.

Any sample code would be great.

Thanks in advance.
0
Comment
Question by:jtjcomp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 6211982
0
 
LVL 1

Author Comment

by:jtjcomp
ID: 6214339
I have gone to both of those sites and I do not see any sample code, the information on those sites is the same that is in my help files for embedded tools, niether provide helpful samples.
0
 
LVL 1

Author Comment

by:jtjcomp
ID: 6214346
The IDE i'm using is VB 3.0 for CE pocket PC.
0
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

 
LVL 3

Accepted Solution

by:
fordraiders earned 100 total points
ID: 6453458
Hope this helps!!


Private Sub Form_Load()
Combo2.Clear
Dim rs
Set rs = CreateObject("ADOCE.RecordSet")
rs.Open "Tn", "\my documents\NM.cdb"
Do While Not rs.EOF
    Combo1.AddItem rs.Fields("Noun").Value
    rs.MoveNext
  Loop

Private Sub Combo2_Click()
Combo1.Text & "'"
Combo1.List(Combo1.ListIndex) & _

Dim rsV
Dim sql2
List1.Clear
Set rsV = CreateObject("ADOCE.RecordSet")
sql2 = "select attribute from Ta where noun = '" & Combo1.List(Combo1.ListIndex) & _
"' and modifier = '" & Combo2.List(Combo2.ListIndex) & "'"
rsV.Open sql2, "\my documents\NM.cdb"
  Do While Not rsV.EOF
List1.AddItem rsV.Fields("attribute").Value
rsV.MoveNext
Loop
rsV.Close
Set rsV = Nothing

Option Explicit

Private Sub Combo1_Click()
Combo2.Clear
List1.Clear
Dim rst
Dim sql
Set rst = CreateObject("ADOCE.RecordSet")
Combo1.Text & "'"
sql = "select MODIFIER from Tnm where noun = '" & Combo1.List(Combo1.ListIndex) & "'"
rst.Open sql, "\my documents\NM.cdb"
  Do While Not rst.EOF
    Combo2.AddItem rst.Fields("modifier").Value
    rst.MoveNext
  Loop
rst.Close
Set rst = Nothing
End Sub

fordraiders
0
 
LVL 3

Expert Comment

by:fordraiders
ID: 6777732
help?????
fordraiders
0
 

Expert Comment

by:nvms
ID: 7212054
The info looks good to me mate, pity your efforts were not acknowledged

NVMS
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question