Solved

Visual Basic and CE Database

Posted on 2001-06-20
6
282 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
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Progress means simplifying, not complicating. Bruno Munari Preface How to detect the name of the internal storage or an SD-card on Windows Mobile device from the desktop application? I got this question, when I was working on a PC applicati…
If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now