CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2428|Reply: 12

Windows CE application + MySQL

[Copy link]
Post time 3-12-2008 08:39 AM | Show all posts |Read mode
Hye forumers sekalian....

Haritu dah settle pasal Windows Application VB.Net + MySQL....

Skang ni plak, aku ada masalah connection VB.Net + MySQL dalam Windows CE application......kira handheld device, pocket pc, etc...

Anyone???
Reply

Use magic Report


ADVERTISEMENT


Post time 3-12-2008 01:57 PM | Show all posts
wowww.. myamira otai rupanya.... tumpang tanya sket lagi... untuk Handheld.. kita nk connection bloototh dari handheld ke printer (like o'neil printer).. mcm mana plakk arrr.... use dev c++



-cup... cuupp- atas tuh bukan saya taip... member saya.. siot!!!:@

[ Last edited by  naikAntena at 3-12-2008 02:01 PM ]
Reply

Use magic Report

 Author| Post time 4-12-2008 12:16 PM | Show all posts
well....sebab tak tau la sy tanya ni...hehehe...

so, ada idea tak?
Reply

Use magic Report

Post time 5-12-2008 01:37 AM | Show all posts
dah ader ke driver mysql untuk compact framework?
Reply

Use magic Report

 Author| Post time 5-12-2008 08:16 AM | Show all posts
dah ada.....pakai Connector .Net 5.1.7 punya...

tapi dia kluar error....Unable to connect to any of the specified MySQL hosts

kenapa ek?
Reply

Use magic Report

 Author| Post time 5-12-2008 08:18 AM | Show all posts
ni  coding saya......for ur reference......


  1. Imports System.Data
  2. Imports MySql.Data.MySqlClient


  3. Public Class Form1
  4.     Dim mycon As New MySqlConnection
  5.     Dim mycmd As New MySqlCommand
  6.     Dim myreader As MySqlDataReader

  7.     Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
  8.         'Dim myconstr As String

  9.         If txtUsername.Text = "" Then
  10.             MsgBox("Please enter the Username", MsgBoxStyle.OkOnly, "No Username")
  11.             txtUsername.Focus()
  12.             Exit Sub
  13.         End If

  14.         If txtPassword.Text = "" Then
  15.             MsgBox("Please enter the Password", MsgBoxStyle.OkOnly, "No Password")
  16.             txtPassword.Focus()
  17.             Exit Sub
  18.         End If

  19.         'myconstr = "Server=localhost;" & _
  20.         '                          "Database=testing;" & _
  21.         '                         "Uid=root;" & _
  22.         '                        "Pwd=;"
  23.         'myconstr = "database=testing;Data source=localhost;User Id=root;Password="
  24.         'myconstr = "datasource=localhost;username=root;password=;database=testing"
  25.         'mycon = New MySqlConnection(myconstr)
  26.         mycon.ConnectionString = "server=localhost;user id=root;database=testing"
  27.         'mycon.ConnectionString = "user id = root;database=testing;host=localhost;password="
  28.         'mycon.ConnectionString = "Server=localhost:3306;Database=testing;User ID=root;Password=xxxx;CharSet=utf8"
  29.         mycon.Open()

  30.         mycmd.Connection = mycon
  31.         mycmd.CommandText = "SELECT username, password, message FROM login"

  32.         myreader = mycmd.ExecuteReader


  33.         While (myreader.Read())
  34.             If myreader.GetValue(myreader.GetOrdinal("username")) = txtUsername.Text Then
  35.                 If myreader.GetValue(myreader.GetOrdinal("password")) = txtPassword.Text Then
  36.                     Form2.lblUsername.Text = txtUsername.Text
  37.                     txtUsername.Text = ""
  38.                     txtPassword.Text = ""
  39.                     Hide()
  40.                     Form2.Show()
  41.                     Form2.lblMessage.Text = myreader.GetValue(myreader.GetOrdinal("message"))
  42.                     myreader.Close()
  43.                     mycon.Close()
  44.                     Exit Sub
  45.                 Else
  46.                     MsgBox("Wrong Password", MsgBoxStyle.Exclamation, "Password Error")
  47.                     txtPassword.Text = ""
  48.                     txtPassword.Focus()
  49.                     myreader.Close()
  50.                     mycon.Close()
  51.                     Exit Sub
  52.                 End If
  53.             End If
  54.         End While

  55.         MsgBox("User does not exist", MsgBoxStyle.OkOnly, "Username Error")
  56.         txtUsername.Text = ""
  57.         txtPassword.Text = ""
  58.         txtUsername.Focus()

  59.         myreader.Close()
  60.         mycon.Close()

  61.     End Sub


  62. End Class
Copy the Code

[ Last edited by  mya_myra at 5-12-2008 08:21 AM ]
Reply

Use magic Report

Follow Us
 Author| Post time 5-12-2008 08:20 AM | Show all posts
macam2 connection string saya pakai....


'myconstr = "Server=localhost;" & _
        '                          "Database=testing;" & _
        '                         "Uid=root;" & _
        '                        "wd=;"
        'myconstr = "database=testing;Data source=localhost;User Id=rootassword="
        'myconstr = "datasource=localhost;username=root;password=;database=testing"
        'mycon = New MySqlConnection(myconstr)
        mycon.ConnectionString = "server=localhost;user id=root;database=testing"
        'mycon.ConnectionString = "user id = root;database=testing;host=localhost;password="
        'mycon.ConnectionString = "Server=localhost:3306;Database=testing;User ID=rootassword=xxxx;CharSet=utf8"


tapi semua kluar error yg sama.....takleh connect....
Reply

Use magic Report

Post time 5-12-2008 04:02 PM | Show all posts

Reply #7 mya_myra's post

pocket pc mya tue boleh connect through network ke?
Reply

Use magic Report


ADVERTISEMENT


 Author| Post time 5-12-2008 04:57 PM | Show all posts
taktau lak leh connect ke tak....

actually, bleh ker install mysql dalam pocket pc ni?
Reply

Use magic Report

Post time 5-12-2008 09:40 PM | Show all posts

Reply #9 mya_myra's post

baru nak tanya...

cube check mysql ader tak buat untuk mysql mobile..

sting biasa pakai sqlce.. SQL server compact edition..
Reply

Use magic Report

 Author| Post time 7-12-2008 08:47 PM | Show all posts
Originally posted by stingbeh at 5-12-2008 09:40 PM
baru nak tanya...

cube check mysql ader tak buat untuk mysql mobile..

sting biasa pakai sqlce.. SQL server compact edition..


sqlce ni under microsoft gak ke? izit freeware, atau kena beli license punya? hmmm.....

check kat mysql website, dia cakap support windows ce.....cuma test emulator tak dapat, blum test kat device lagi....

hmm, cuba story skit pasal sqlce ni....
Reply

Use magic Report

Post time 8-12-2008 12:58 AM | Show all posts

Reply #11 mya_myra's post

sqlce dia under microsoft..
rasanye free ... dia adalah sqlserver tapi dibuat untuk mobile/pocket pc.

kalau nak baca kene donwload jugak RAPI ...
rapi nie dll untuk baca sqlce punye database.
Reply

Use magic Report

 Author| Post time 9-12-2008 12:42 PM | Show all posts
saya ada cuba sqlce ni....through this website http://msdn.microsoft.com/en-us/library/aa454892.aspx

tapi dia dah customized khas untuk add and edit...dan dia tak bagi contoh untuk delete dan retrieve.....

saya nak contoh untuk login guna username & password.....stingbeh ada example tak...
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

24-1-2025 05:39 AM GMT+8 , Processed in 0.121094 second(s), 26 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list