Erick,
Well, there are several different ways to go about this, depending on what you want. The easiest way (similar to MS Access's auto increment) is to do something like:
CREATE TABLE auto_inctable (foo int DEFAULT SERIAL, bar varchar(20))
This will create a table with an auto incrementing column named 'foo.' So if you do a INSERT like:
INSERT INTO auto_inctable (bar) values ('some info')The field, "foo," will automatically increment.
There are other ways to do this. You can use sequences, or triggers, or a combination of the two. These methods will give you greater control over the ID generation process. If the ID you generate is non-trivial, I suggest you have a look at these two methods.
John you have been very helpful, many thanks to you and many thanks forFunny you should mention it... Actually, I'm working on a book on MaxDB. If you like, I can put you on a mailing list that will notify you when it's out.
being in this forum to help people like me to use maxdb....
Hope that helps, JLS
Erick Perez wrote:
I use studio and DBM gui, i just wanted to try that tool because is supposed to be more easy to use. I now have to setup an odbc connector and let a MS Access frontend app and an ENVOX voice app to talk to the mysql. If you happen to have code to setup a mysql function similar to the "autonumber" function found in the MS Access package i will be glad if you could let me see it. Its a customer management solution and every new customer must have a customer ID automatically generated (by mysql) number so we dont let the sales reps to enter customer numbers and we can use that customer ID as a reference between tables... I think it will be important to say that im switching from MS Access to MaxDB and im kind of used to have Microsoft documentation with a more detailed examples such as this function im looking for.... the automatinc number generation example found in the website is kind of difficult to understand for me (or am i dumb for being working with ms technologies so long?? jeje)
John you have been very helpful, many thanks to you and many thanks for being in this forum to help people like me to use maxdb....
Thanks,
erick
-----Original Message-----
From: John Singleton [mailto:[EMAIL PROTECTED] Sent: Monday, June 07, 2004 12:08 PM
To: Erick Perez
Cc: [EMAIL PROTECTED]
Subject: Re: does maxdb uses 3306 as the tcpip port in windows
Erick,
I didn't know you could use MySQL administrator with MaxDB. I may be wrong, but I don't know of a way to do that. You might want to try DBM GUI and SQL Studio. Both are available here:
http://dev.mysql.com/downloads/maxdb/7.5.00.html
Cheers, JLS
Erick Perez wrote:
indeed is 7210 tcp (im using windows).file.
i wanted to try mysql administrator but the program does not seem to work. I enter dba/pass and port 7210 and it never connects....
anyways......thanks
erick
-----Original Message----- From: John Singleton [mailto:[EMAIL PROTECTED] Sent: Saturday, June 05, 2004 10:03 AM To: Erick Perez Cc: [EMAIL PROTECTED] Subject: Re: does maxdb uses 3306 as the tcpip port in windows
Erick,
The port number you're looking for is 7210. This port number is only used if the communication is non-local. When you install MaxDB in *nix based platforms, you're required to put three entries into your services
(SDBINST usually does this by automatically.)
sql6 7210/tcp sql30 7200/tcp sapdbini72 7269/tcp
Cheers, JLS
Erick Perez wrote:
this will be a newbie question but when i try to create a server or an instance with the gui tool, the section that you must type the port says <default>, but my question is, what is the default port? because is *not* 3306. i tried to find it in the CHM documentation but searching
for "port"
"ip port" and "listening port" gave me no answers....
thanks,
erick
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
