[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Visual Basic and CE Database

Posted on 2001-06-20
6
Medium Priority
?
330 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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
LVL 3

Accepted Solution

by:
Fordraiders earned 400 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
A short article about problems I had with the new location API and permissions in Marshmallow
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

872 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