Forum Replies Created
-
AuthorPosts
-
peterlaursenParticipant
Could it be that you have more versions (old and new) versions of the fonts installed ?
peterlaursenParticipantI agree … good feature 😀
peterlaursenParticipantI think that if you work on both databases at the same time, you will need to write code to solve the problem …
But I am far from an expert in this, so maybe someone else comes up with some “smart” solution …
peterlaursenParticipantYou can also create a column in each table with those values. (and to save space you can use single characters or “0” and “1” or whatever … ). Then you set the default value “laptop” for that column on your laptop, and “server” on the server. Further add an autoincrement integer in each table. Let the PK consist of of both.
Now when syncronizing PK values
Quote:' 17654; “laptop” 'AND
Quote:' 17654; “server” 'are NOT identical and no new data will be overwriten in syncronization.
With this solution you won't need to write code to fetch data from another tabel. I think that was the workaround that i would try in your situation ….
You are not the first person in this forum with this request/expectation/wish/need ….
But basically I think it's not a Sqlyog issue – it's a Mysql issue.
To me it seems like you expect MySQL to be a distributed database system, and it is not!
peterlaursenParticipantIt could be a problem with the CSV
Excel and CSV (and ODBC too) 😡
Try this instead ….
1) Save your Excel file to the desktop , and OPEN IT FROM ACCESS (yes: you can open the .xls-file from Access! just – file … open .. Excel-files … your file)
2) Create an MySQL-database with Sqlyog if you don't allready have done so
3) Create a user with at least “insert”-privilege to that database also with Sqlyog
4) and create an ODBC-instance using that username for that database
Now from Access File .. export .. ODBC-database .. your ODBC-instance
That's what I just did !!
peterlaursenParticipantWhat you miss is to understand what a PK (primary Key) is, I'm afraid !
The PK is THE most important index to a database. SQLyog depends totally on it not only when syncronizing, but also when updating, deleting etc. Without the PK the records in the base can't be identified by sqlyog and if the PK in two records is identical in two databases with the same structure the syncronization tool overwrites the target row with data from the source. That's not an error – that's how it is meant to work. Because: If two rows has the same value of the PK there must be a rule for the software to decide which record/data are “the right one”. And the rule that sqlyog uses is that in that situation the “sorce” data are the “right one”s. So source and target are not arbitrary names but are names constituating a rule for the program to work!
A very simpel way to create a PK is to use an autoincremented integer as PK, but if you add records/rows (as you do) to both copies of the base between syncronizations you will risk to have different records/rows with the same value of the PK. In that case you will have to build a primary key thats has different values depending on which machine it has been made. Example: create a table more with only one row in it in the DB, put one text feld in it: on the laptop value could be “laptop” – on the server value could be “server”. Create a PK using that text field AND a value that's unique on each machine.
Note too that there is NO sort of time-control in the sqlyog syncronization tool.
peterlaursenParticipantHere the date format does not look weird when read with Access through ODBC – see attached pic . (sorry it's danish!)
I just entered some data in an Excel spreadsheet, exported to a MySQL database and opened that MySQL database with Access through ODBC. Date is column “F3”
But I remember that the MySQL documentation has some remarks about the compability with Access.
Have you searched that documentation ?? There are som settings on the “advanced” tab that must be right.
Tip: Search for “MyODBC and Microsoft Access” in the searchable version of the doc's
Note especially that “Return matching rows” should be checked. You must also have recent versions of Microsoft MDAC and JET-engine. It's all in the MySQL documentation …
There is one user remarking:
“Beware of MyODBC 3.51.11 (and .10 probably too) with Access. I've noticed that after refreshing ('refresh linked tables') tables all date/datetime/timestamp fields turned into 'text' and I couldn't update any table containing such fields. Got back to 3.51.06 I used previously. No problems with this one.” – could that be your problem ? (though I can't reproduce that error on my system with Access 2000!)
What are the exact program versions that you use (MySQL, MyODBC, MS-Access) ?
peterlaursenParticipantpardon me but
Quote:Changes made to my target database locally are consistently overridden by the values in the source databaseYes that's the way it works – and should work!
In the syncronization proces data from the source will overwrite data in the target if the values of the PK are identical.
to me it sounds like you are turning source/target around … if you have made changes to one database and want to syncronize the one with the newly made changes is sorce in the proces …
did I get something totally wrong ??
peterlaursenParticipantI remember that there are two .exe distributions of mysql for windows:
a small one (“windows essentials”) and a “complete” one. Maybe it's the “windows essentials” distribution that you got ?
I am quite sure, that it also must be included in the version without installer !
peterlaursenParticipantand here is the wrapper file
peterlaursenParticipantyes i can mail it to you.
you can safely send your email to me from my personal homepage http://www.deepeter.dk .
I also try to attach it here: ( mysql_fix_privilege_tables.sql )
but there is a so-called wrapper-file ( mysql_fix_privilege_tables ) too – I really don't remmember if it is needed …
write again if you need help to search the mysql docomentation, but it seems like you know what you are doing 😉
peterlaursenParticipantyou will NOT need to use phpadmin.
Differnt methods of connecting to a mysql-database are available. PhpMyAdmin uses the php interface – sqlyog uses the C-api's from mysql that are compiled into sqlyog.
peterlaursenParticipantIt's in the /scripts directory placed in the directory tree under your mysql installation directory.
/program files/mysql/mysql server 4.1/scripts with a typical mysql installation.
However I have no problems with user privileges with mysql 4.1.10 and sqlyog 4.03 beta
peterlaursenParticipant1) Maybe true and maybe false!
if your ISP has blocked port 3306 on which mysql normally communicates, you will EITHER need to use a program running on the server system at the ISP (such as phpMyAdmin) and connect through an ordinary web browser OR use tunnelling. Tunneling is supported by sqlyog entreprise but not the free version of sqlyog.
2) Personally I prefer a complete test system locally (web server + php-system + mysql-server – and if you like support for .asp and .jsp etc.). Then you can test your solutions before uploading to the production server. Further when using features such as SSI includes, php pages etc. they will not always show up correctly when just opening the file in the browser (though Dreamweaver in that respect is much better than fx. Frontpage). Opening from a local webserver will show the page correctly.
3) I don't quite understand. If you can't connect it could be because the 3306 port is blocked at the ISP or it could be a firewall-problem. I don't think you'd have to reboot – you should be able to shut down the sqlyog proces from task manager if it does not time out by itself. Current version o sqlyog is not multithreaded, so it seems like the program “hangs” when it's busy. the upcoming yougmax program will be fully multithreaded.
4) yes .. you should use this information. Look at a copy of my connection screen below. But again – if port 3306 is blocked you will have to use tunnelling.
5) It should normally be OK just to change .htm files to .php – provided of course that php is installed as a module in the web server. Your start page however maybe will have to be exactly “index.html” – but maybe you can configure that – that varies!
6) Don't understand! If Dreamweaver wont let you save the files as .php-files then just use an ordinary ftp-klient to rename the files on the server. I recommend SmartFTP http://www.smartftp.com.
7) concerning asp and php in the same webpage. I know absolutely nothing about asp –
– but it's likely that you run into a limitation with the server system that won't let you configure the same filetype as supporting both. (actually I can't even use SSI in php-pages due to a silly limitation with my ISP – on my local system it's no problem!)
peterlaursenParticipantOh thx Ritesh … didn't see your answer ….
-
AuthorPosts