Lynette
|
| Posted: 01/08/2002, 7:53 PM |
|
Ok, I'm slowly catching on here. Now that I regenerated the samples to use MySQL instead of ODBC (which is how the are compiled I now understand), How do I generate the SQL to add to my SQL database? or should I just pull that from the samples? Is Code Charge capable of generating the SQL to build tables defined in projects?
Thanks!
ltillner@yahoo.com
|
|
|
 |
Alex Alexapolsky
|
| Posted: 01/09/2002, 2:20 AM |
|
Basically you must create a database yourself and then create CC application.
But CC examples are provided with database scripts located in examples SQL
directory
|
|
|
 |
Ralf
|
| Posted: 09/25/2002, 12:02 PM |
|
Why can not CodeCharge a SQL Script that I can import for example with phpMyAdmin?
So I whould save the time i loss when I build the tables manualy
Ralf
|
|
|
 |
teufel
|
| Posted: 09/25/2002, 3:23 PM |
|
Here is (IMHO) the best way to do it: you open the sample MDB database in your local computer inside MS-Access and then export it *directly* (i.e. structure and data) to the remote MySQL database. In order to be able to do that please follow these steps:
1) Download the latest ODBC drvier for MySQL (named MyODBC) from MySQL site (http://www.mysql.com/downloads/api-myodbc-2.50.html) and install it.
2) Define an ODBC DSN (Data Source Name) related to your remote MySQL database. (This ODBC DSN setup you may find directly under Windows Control Panel, or in Win-XP - which is the one I use - under 'Administrative Tools' inside Control Panel).
You should define a *SYSTEM DSN*, so select the correct tab inside the DSN setup dialog window. Select then the option to *ADD* a new DSN. You should see a list of different ODBC drivers installed in your system. Select *MySQL* as the driver you will be using for this DSN.
Now you'll see a dialog window specific to MySQL driver with the following options:
Windows DSN name: fill out any name you want - e.g. SampleConnection
MySQL Host (name or IP): the name or IP of your server where your db is
MySQL Database Name: the name of the database
User: the MySQL user which has rights to access this database
Password: the password of this user, if you also defined it
The other options you would probably leave blank (the port where MySQL runs is by default 3306, and all other options you shouldn't probably change).
After hitting the *OK* button you should see a new entry at the system DSN's with the name you specified for this DSN. Click over this entry and then over the button named *Configure...* to configure this newly created DSN. Then click over the button named 'Test Data Source'. If the ODBC connection was configured correctly you should see a message similar to the one below:
Data Source 'SampleConnection' connected Successfuly to 'mysqld-3.23.49' !!!
If you receive any error message in this stage, it means you're not being able to connect successfuly to your database (e.g. due to problems with database user rights, hosts access rights, etc...), so you should first make this connection work before proceeding.
2) Now open your sample MDB file inside Access, and click over the table you want to export to MySQL. Now at menu 'file' you should choose option 'Export'.
Please choose the option 'ODBC Databases ()' for the 'save as' type. You should see then another window asking for the name you will give the table at the remote database (it should be already filled with the local name of your table). Clicking 'OK' you will see now another window where you will specify the DSN ODBC to use to export the data. Please choose the tab for 'System DSNs' and then the newly created MySQL DSN and click 'OK'.
That's it!!!
If all goes well you should just wait (if the table is a little bigger) and your table will be created remotely and all the data will be exported to it. You should probably afterwards make some minor adjustments to field types or atributes (not nulls, etc.). If the table already exists remotely, you will receive an error message from MyODBC stating that the table already exists and your data will not be exported.
teufel
|
|
|
 |
teufel
|
| Posted: 09/25/2002, 3:27 PM |
|
NOTE: The suggestion given by Alex (import the data directly into MySQL) is by far the best in case you have the script for MySQL at disposal. I did not try it for the sample sites, so I don't know if you will find a MySQL script for every sample database.
My suggestion above is though interesting if you don't have MySQL installed locally and want to still be able to have Access friendliness and make any knids of changes to your database locally.
|
|
|
 |
Dru
|
| Posted: 01/10/2003, 8:24 AM |
|
Purchased ccs and am learning. Also not well versed with
all the programming required for the web so from a newbies standpoint
I have been terribly confused.
When build a new application in ccs, does ccs not automatically create
the mysql tables? If it does not, what is the best way to go about this...
through phpmyadmin or is there a better and easier way to create the tables and fields? phpmyadmin is great, but doing this manually can be very tedious and time consuming.
Also, if I have flatfile databases, how can export data to mySql and build
application through css around it?
Thanks for your great program.
|
|
|
 |
|