Solved

Visual Basic and CE Database

Posted on 2001-06-20
6
290 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mobile Device Management with Microsoft Intune.  Worth it? 2 160
hiding on whatsapp 4 86
cheap and best smart phone 30 99
smart phone memory and app 3 70
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…
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

17 Experts available now in Live!

Get 1:1 Help Now