473,508 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting an Access app from Jet database to MySql

Anyone have experience with converting an access app from Jet database
to Mysql? I am specifically looking for any changes I would have to
make to my access forms, queries, modules, vba code, etc. I understand
there are some data format differences in text field types and date
types that need to be addressed if converting from Jet to Mysql. But
other than things that have to be addressed when converting, what other
changes must I make?

Ex. will autonumber fields still work?

Are there more changes to use MySQL than Microsoft's SQL Server?

Bob
Jun 2 '06 #1
4 3299
On Fri, 02 Jun 2006 17:10:31 -0500, Bob Alston <bo********@yahoo.com>
wrote:
Anyone have experience with converting an access app from Jet database
to Mysql? I am specifically looking for any changes I would have to
make to my access forms, queries, modules, vba code, etc. I understand
there are some data format differences in text field types and date
types that need to be addressed if converting from Jet to Mysql. But
other than things that have to be addressed when converting, what other
changes must I make?

Ex. will autonumber fields still work?

Are there more changes to use MySQL than Microsoft's SQL Server?

Bob


I am not trying to start a controversy but why are you switching to
mySQL?

What are the advantages?

I am all for anything that breaks up the Microsoft monopoly a little
bit so I am asking out of interest.

Thanks.

Jun 2 '06 #2
Bookreader wrote:
On Fri, 02 Jun 2006 17:10:31 -0500, Bob Alston <bo********@yahoo.com>
wrote:

Anyone have experience with converting an access app from Jet database
to Mysql? I am specifically looking for any changes I would have to
make to my access forms, queries, modules, vba code, etc. I understand
there are some data format differences in text field types and date
types that need to be addressed if converting from Jet to Mysql. But
other than things that have to be addressed when converting, what other
changes must I make?

Ex. will autonumber fields still work?

Are there more changes to use MySQL than Microsoft's SQL Server?

Bob

I am not trying to start a controversy but why are you switching to
mySQL?

What are the advantages?

I am all for anything that breaks up the Microsoft monopoly a little
bit so I am asking out of interest.

Thanks.

I have gotten interested in MySQL for two reasons
1) for an upsizing database, when Access' Jet is not sufficient
2) Because it is the database used by some software I am testing that
converts Access Forms to web based.
If I can get the access converted to result in web forms, converted from
Access forms, and I can still use Access to access the Mysql data to run
reports, it might be a nice combination.

Bob
Jun 2 '06 #3
I played with MySql + ms-access.

For the most part, things will work quite well. Not a lot of difference then
moving the data to sql server (and, we have several free versions of sql
server now anyway).

A few things:

Code that picks up the autonumber field (identity field) needs changed. You
have to *force* the update, and THEN grab the id

dim rstRec as DAO.RecordSet
dim lngNewID as long
set rstRec = currentdb.OpenRecordSet("yourtable")

rstRec.AddNew
rstRec!City = "Edmonton"
lngNewID = rstRec!ID
rstRec.Update
rstRec.Close
set RstRec = Nothing

At this point, lngNewID is set to the last id created.

When using sql server (or just about *any* server), you have to force the
update, so, all my code (which
works both for JET, and sql server) is now:

rstRec.AddNew
rstRec!City = "Edmonton"
rstRec.Update
rstRec.BookMark = rstRec.LastUpdated
lngNewID = rstRec!ID

Note how we move the record pointer back to the last record. And, if you use
ADO code, then you can execute the update, and not have to move the record
pointer back (so, if you're exiting code is ado, then you likely will not
have the above problem/issue).

So, some code needs to be changed.

further, make sure ALL tables have a primary key. And, *always* expose the
timestamp field to your forms (ms-access uses the timestamp to figure out
what fields to update..and without this, it has to work hard to figuring
things out. In fact, I seem many sub-forms go messy if you don't have the
timestamp.

So, for the most part, I would bet that 90%, or even higher of your existing
code will work. There is a just a few issues like above....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.members.shaw.ca/AlbertKallal
Jun 5 '06 #4
Albert D.Kallal wrote:
I played with MySql + ms-access.

For the most part, things will work quite well. Not a lot of difference then
moving the data to sql server (and, we have several free versions of sql
server now anyway).

A few things:

Code that picks up the autonumber field (identity field) needs changed. You
have to *force* the update, and THEN grab the id

dim rstRec as DAO.RecordSet
dim lngNewID as long
set rstRec = currentdb.OpenRecordSet("yourtable")

rstRec.AddNew
rstRec!City = "Edmonton"
lngNewID = rstRec!ID
rstRec.Update
rstRec.Close
set RstRec = Nothing

At this point, lngNewID is set to the last id created.

When using sql server (or just about *any* server), you have to force the
update, so, all my code (which
works both for JET, and sql server) is now:

rstRec.AddNew
rstRec!City = "Edmonton"
rstRec.Update
rstRec.BookMark = rstRec.LastUpdated
lngNewID = rstRec!ID

Note how we move the record pointer back to the last record. And, if you use
ADO code, then you can execute the update, and not have to move the record
pointer back (so, if you're exiting code is ado, then you likely will not
have the above problem/issue).

So, some code needs to be changed.

further, make sure ALL tables have a primary key. And, *always* expose the
timestamp field to your forms (ms-access uses the timestamp to figure out
what fields to update..and without this, it has to work hard to figuring
things out. In fact, I seem many sub-forms go messy if you don't have the
timestamp.

So, for the most part, I would bet that 90%, or even higher of your existing
code will work. There is a just a few issues like above....

Thanks very much. I knew about the auto number issue with SQLserver but
not aware that it applied to MySQL. YOur code to handle it is much
appreciated.

Bob
Jun 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1283
by: Mike Doanh Tran | last post by:
Hi all, Does anyone have any suggestion for converting a Sequel database to MYSQL? I just want to copy a Sequel database data to a Mysql one. Thanks in advance for any suggestion, Mike --
17
2866
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I...
2
1877
by: John | last post by:
I'd love to hear some expert opinion on my situation. My department relies on Excel as a database, which causes crashing due to resource depleting and basically is just too slow. For example, a...
7
8670
by: RCS | last post by:
Okay, a rather 'interesting' situation has arisen at a place I work: I need to convert a database from Access to something that can be used over the web. I am currently maintaining and...
4
3309
by: Dan Lewis | last post by:
I've imported a ms access database into a table in a mysql database. The access database contains a field that holds date/time values in 'general date' format. These all show up at 01/01/1970 in...
15
4564
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
8
2219
by: Michael B. Trausch | last post by:
I was wondering if anyone has had any experience with this. Someone I know is trying to move away from Microsoft Works, and I am trying to look into a solution that would convert their data in a...
28
3539
by: Randy Reimers | last post by:
(Hope I'm posting this correctly, otherwise - sorry!, don't know what else to do) I wrote a set of programs "many" years ago, running in a type of basic, called "Thoroughbred Basic", a type of...
4
5694
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
0
7118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.