Solved

Visual Basic and CE Database

Posted on 2001-06-20
6
300 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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