Board index » delphi » Re: Getting started
Craig Stuntz [TeamB]
Delphi Developer |
Craig Stuntz [TeamB]
Delphi Developer |
Re: Getting started2003-07-10 08:29:36 PM delphi123 There are several IBX articles linked at delphi.weblogs.com/articles -- Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : delphi.weblogs.com IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt your DBs! Open Editon users, get 6.0.1.6 from mers.com |
Lance Bell
Delphi Developer |
2003-07-11 09:29:11 AM
Re: Getting started
Craig Stuntz [TeamB] writes:
Quote
|
Jochen Haber
Delphi Developer |
2004-02-23 03:05:46 AM
Re: Getting started
I am just getting started. To teach myself, I am trying to write a
little app to convert some Paradox databases to Datastore. I am trying to use setConnection. What do I put in Driver String in order to use a W2000 ODBC driver or am I going about this in the wrong way? Jochen Haber |
Paul Furbacher [TeamB]
Delphi Developer |
2004-02-23 11:47:46 PM
Re: Getting started
Jochen Haber writes:
QuoteI am just getting started. To teach myself, I am trying to write a is "W2000"? You mention ODBC, so I get the feeling that you are trying to connect to the Paradox database. I'm not sure that is possible, but since I have never worked with Paradox, I am only going by what research I can do -- that is, a search of the newsgroup archives reveals that only a Type 3 JDBC driver is available for Paradox. (You don't really want to go there.) If you mention ODBC with respect to JDataStore -- "danger Will Robinson!" -- don't do that. I repeat: DO NOT use an ODBC driver! Use the JDataStore Type 4 JDBC driver which comes with JBuilder. Also, study the examples which come with JBuilder: they are in the samples folder, specifically in the folders named DataExpress, dbSwing, and JDataStore. For example, in the "WorkModule" class of the "Basics" example in /samples/JDataStore/Basics" folder, look at the "openJDBCConnection()" method. It quite clearly shows you how to go about this. Note that the driver is in the JDataStore library. If the notion of library is new to you, please read the on-line documentation which comes with JBuilder -- it is your friend and it is available from the "Help" menu in the IDE. -- Paul Furbacher (TeamB) Save time, search the archives: www.borland.com/newsgroups/ngsearch.html Is it in Joi Ellis's Faq-O-Matic? www.visi.com/~gyles19/fom-serve/cache/1.html Finally, please send responses to the newsgroup only. That means, do not send email directly to me. Thank you. |
Jochen Haber
Delphi Developer |
2004-02-24 12:29:33 AM
Re: Getting started
By W2000 I mean Windows 2000. There are ODBC drivers that come with
W2000 which can be used to read Paradox, Access, Excel, dBase, etc. files. I had the impression that I could name a driver I want to use in the Driver string for the setConnection. But I don't know what to put there. I am trying to use the BasicApp in the Database sample to teach myself how to use JBuilder with respect to databases. I need to convert some Paradox databases to Datastore. Paradox allows SQL queries via ODBC so I'd learn how to use that and JDatastore to write the new database. I cannot decode how the naming convention works. Is there something in the registry that I have to find? I have also looked through the newsgroups and find little on using ODBC. Jochen Paul Furbacher [TeamB] writes: QuoteJochen Haber writes: |
Paul Furbacher [TeamB]
Delphi Developer |
2004-02-24 02:33:22 AM
Re: Getting started
Jochen Haber writes:
QuoteBy W2000 I mean Windows 2000. correspondence. (However, maybe in Europe it's different.) Similarly, WXP wouldn't connote Windows XP, whereas Windows XP would. QuoteThere are ODBC drivers that come with to ask why fool around with this, when what you want to learn is JDataStore and JDBC? The general pattern for the URL is jdbc:odbc:<name of ODBC DSN> Again, use the power of the examples: ./samples/DataExpress/JDBCBenchmark See the "connect()" method and all of the references it invokes in src/com/borland/samples/dx/benchmark/JDBCBenchmark.java Note the "new ConnectionDescriptor()" call. Follow that into "getDriver()", "getUrl()", and so on. (You should be able to root around like this on your own. JBuilder empowers you to do this. Just open the projects and start digging. If you don't know how to dig, read the manual. It's really essential to empower yourself in these ways.) QuoteBut I don't know what to put searches tirelessly (via Search>Search in Path> Specified directory: ...) for things like "odbc". Again, empower yourself by reading the manual, being clever with searches, and so on. QuoteI need to convert QuoteI have also looked through the newsgroups least noticed that just about any mention of JDBC ODBC in the archives contains a warning against using it. Why do you need to query the Paradox database if you are going to work with JDataStore? Do you need to transfer existing data? If so, there are easier ways to do this than writing Java code. There's a package called PxTools which will help you do this. Once you get the sql scripts you need, create that JDataStore db and import the data. Here are two URLs for PXTools: jan.kneschke.de/projects/pxtools/ sourceforge.net/projects/pxtools/ If this is a learning exercise, just concentrate on designing your database in JDataStore, and accessing it using the JDataStore JDBC driver. I would avoid trying to write code which opens your Paradox stuff and then writes it to the new JDataStore db. You can probably spend your time more fruitfully. Also, get comfortable with DB Pilot in the Tools menu. Connecting to databases, testing the connection, executing raw SQL, and so on from DB Pilot can be of great value. -- Paul Furbacher (TeamB) Save time, search the archives: www.borland.com/newsgroups/ngsearch.html Is it in Joi Ellis's Faq-O-Matic? www.visi.com/~gyles19/fom-serve/cache/1.html Finally, please send responses to the newsgroup only. That means, do not send email directly to me. Thank you. |
Jochen Haber
Delphi Developer |
2004-02-24 03:45:29 AM
Re: Getting started
Thanks for all of that.
You miss the point slightly in that I am trying to teach myself how to connect to existing databases. Paradox is SQL enabled and then I would expect that an ODBC driver for Paradox databases should work just fine. If not, then maybe Java is not right for what I want to do if it does not access databases via vanilla ODBC. The simple question still is: How do I nominate an arbtirary driver in the setConnection. How does the prefixing alias jdbc:odbc: actually work? You also underestimate the amount of rooting around that I am doing. Nobody seems so mention why ODBC is a bad idea. Maybe it is something parochial about Java. Paul Furbacher [TeamB] writes: QuoteJochen Haber writes: |
John B. Moore
Delphi Developer |
2004-02-27 01:25:48 AM
Re: Getting started
In <XXXX@XXXXX.COM>Jochen Haber writes:
QuoteYou miss the point slightly in that I am trying to teach myself how to your "URL" to locate the correct driver class and load that class. You can have multiple drivers loaded and it is the DriverManagers responsibility to determine with driver is appropriate for the requested database. Hence your "URL" must provide sufficient information to it to make that determination.. (i.e. you need to study JDBC if you are going to make any progress in this area..) QuoteNobody seems so mention why ODBC is a bad idea. Maybe it is something ported to other platforms.. which is good..) Java has a database connectivity API as well and it is call JDBC.. It mirrors in many ways ODBC in structure but with a key differnce.. it is designed by default to be cross platform. (Which of course is one of the key issues for Java itself, go figure..<G>) Now where does the leave you..?? Well there is the JDBC-ODBC bridge supplied by Sun which was designed originally as a "demo" of the concept of using JDBC to bridge to ODBC on those platforms that have an established ODBC protocol. (i.e. Windows) This bridge is strictly a "demo" and should not be used for any servious db work. There are third party bridges, and that is were you should look if you insist on using ODBC,, but my recommendation is that you use JDBC.. There are many drivers out there, and a number of them are open source or free from the db vendor, there is also a very active third party source for quality drivers.. But no matter how you cut the cake you will need to learn JDBC.. John.. -- ============================================= TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! Post all questions and replies to this newsgroup ONLY For papers on DataExpress, Applets, JSP, and Web Development go to: www.microps.com/mps/papers.html ==================================================== |
Lori M Olson (TeamB)
Delphi Developer |
2004-02-27 04:41:22 AM
Re: Getting started
John B. Moore (TeamB) writes:
QuoteNow where does the leave you..?? Well there is the JDBC-ODBC bridge -- Regards, Lori Olson (TeamB) ------------ Save yourself, and everyone else, some time and search the newsgroups and the FAQ-O-Matic before posting your next question. Google Advanced Newsgroup Search www.google.ca/advanced_group_search Other Newsgroup Searches: www.borland.com/newsgroups/ngsearch.html Joi Ellis's FAQ-O-Matic: www.visi.com/~gyles19/fom-serve/cache/1.html |
Casey
Delphi Developer |
2004-04-22 07:39:33 AM
Re: Getting started
I have just purchased C++ Borland 6, personal. I have never used this software. I am familiar with C++ coding in an older version of Borland as well as in CodeWarrior. Could someone please tell me how to get started. I just need to code a simple program with one .cpp file. I have found how to open a .cpp file and to enter code. I can not however get any output to show. Please help!
|
Michael Harrington
Delphi Developer |
2004-04-22 09:32:31 AM
Re: Getting started
"Casey" <XXXX@XXXXX.COM>writes
Quote
just need to code a simple program with one .cpp file. I have found how to open a .cpp file and to enter code. I can not however get any output to show. Please help! File>New>Other>Console Wizard Check C++ ,Check Use CLX , Check Console App, then OK You should now be presented with a partially completed C++ file. Paste the following over it. //-------------------------------------------------------------------------- - #include <clx.h> #pragma hdrstop //-------------------------------------------------------------------------- - #pragma argsused #include <iostream> #include <conio>//for getch() using namespace std; int main(int argc, char* argv[]) { cout <<"Hello" << endl; getch();//prevents output from flashing by. return 0; } //-------------------------------------------------------------------------- - |
Casey
Delphi Developer |
2004-04-22 09:52:53 AM
Re: Getting started
"Michael Harrington" <XXXX@XXXXX.COM>writes:
Quote
|
Ed Mulroy [TeamB]
Delphi Developer |
2004-04-22 10:09:20 AM
Re: Getting startedQuoteI am unable to check Use CLX. Now what do I do? Quote>File>New>Other>Console Wizard Check C++ ,UNCheck Use CLX and Use VCL, Check Console App, then OK ------------------------------ #include <iostream> #include <conio>//for getch() using namespace std; int main(int argc, char* argv[]) { cout <<"Hello" << endl; getch();//prevents output from flashing by. return 0; } ------------------------------ Various trivial hi world variant programs illustrating rather basic console and GUI mode programs all of which are accompanied with either a make file or batch file in case you also want to build from the command line. www.mulroy.org/hello.zip . Ed QuoteCasey writes |
Casey
Delphi Developer |
2004-04-22 10:38:50 AM
Re: Getting started
"Ed Mulroy [TeamB]" <XXXX@XXXXX.COM>writes:
Quote>I am unable to check Use CLX. Now what do I do? |
Ed Mulroy [TeamB]
Delphi Developer |
2004-04-22 11:54:04 AM
Re: Getting started
#pragma hdrstop
A result of the number and complexity of header files used in a C++ language compilation is that significant time is spent processing them. As a solution the compiler pre-compiles header files into a form which can be quickly processed. As a consequence of this an image of each header file set and ordering found in the entire project must be kept in the precompiled file. Such multiple sets can lead to diminishing returns and even to compile times that compare unfavorably with if they were not used. The method used to avoid this is to use #pragma hdrstop to mark for the compiler the line at which the precompiled header process should end. Files which are included after that pragma will not be involved in that process. #pragma argsused When a calling argument to a function is not used the compiler issues a warning. If you wish to suppress such warnings then place #pragma argsused on the line immediately preceding the function. pragmas in general Pragmas are a method specified by both the C and C++ language standards for setting compiler specific options. Click Help in the IDE's menu. Choose C++ Builder help. If an index it is not shown, click on the Index tab. Enter the word pragma into the edit control and click the Display button to get to a page which describes the available pragmas and their meanings. calling arguments to the function main The function main is where all console mode and standard C or C++ programs begin processing. It is pre-declared. It can be expressed as having no arguments, one argument of the type int which is commonly called argc and is command line argument count, two arguments, argc plus a char** command line argument value array commonly called argv or possibly more arguments as an allowed but compiler-specific item. It might be worthwhile to read a bit about C++. This page has links to tutorials, language standards and people's pages where help on the C and C++ languages can be found. www.mulroy.org/programg.htm . Ed QuoteCasey writes |