Access and MySQl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shoa

    Access and MySQl

    Hello

    I can link MS Access (front) with MySQL (back end). However, when I add a
    new record, the previous added record is signed as Deleted record (view in
    Access) even I can view this record in MySQL.
    Please help to go over this...

    Thank you
    S.Hoa


  • JIM WHITAKER

    #2
    Re: Access and MySQl

    I am new to mysql, but I figured this one out, please someone correct me if
    this is a wrong answer. Here's what you do:
    Even though you have an auto increment index in mysql, by incrementing it in
    code will solve this. Look at this example.

    Private Sub Form_Current()
    Dim NEWID As Long, CID As Long
    If Me.NewRecord Then
    Combo14.Enabled = False 'innore this line, search
    disabled here.
    CID = DMax("PETID", "PETS") 'get highest id
    NEWID = CID + 1 ' increase this id by 1
    petid = NEWID ' insert the new id
    in the id field.
    Else
    Combo14.Enabled = True
    End If
    End Sub

    Even though this in an auto incrementing index field in mysql, this works.
    I do not get the
    #DELETED. If on the other hand i manually enter a number, I get the
    #DELETED.
    I guess some how it gets updated, and mysql allows for an overide and
    doesn't auto increment. Please reply and let me know about this, I am new
    to mysql, but I have been programming access databases over 6 years, before
    that dbase 3+.

    "shoa" <son@slingshot. co.nz> wrote in message
    news:1120530036 .470390@ftpsrv1 ...[color=blue]
    > Hello
    >
    > I can link MS Access (front) with MySQL (back end). However, when I add a
    > new record, the previous added record is signed as Deleted record (view in
    > Access) even I can view this record in MySQL.
    > Please help to go over this...
    >
    > Thank you
    > S.Hoa
    >
    >[/color]


    Comment

    • Jeff North

      #3
      Re: Access and MySQl

      On Tue, 5 Jul 2005 14:27:12 +1200, in mailing.databas e.mysql "shoa"
      <son@slingshot. co.nz> wrote:
      [color=blue]
      >| Hello
      >|
      >| I can link MS Access (front) with MySQL (back end). However, when I add a
      >| new record, the previous added record is signed as Deleted record (view in
      >| Access) even I can view this record in MySQL.
      >| Please help to go over this...
      >|
      >| Thank you
      >| S.Hoa[/color]

      Check your datatypes compatibility. MSAccess doesn't understand bigint
      types and will show the delete message for the field value.
      ---------------------------------------------------------------
      jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
      ---------------------------------------------------------------

      Comment

      Working...