| Hyderabad Jobs | Book Website | ![]() |
I Love Hyderabad | Hyderabad Colleges |
| Home | Business Emails | Hyderabad Classifieds | Contact Us | |
| 7 Wonders of Hyderabad | Web Hosting | Yellow Pages | Our Network | |
Advanced PowerBuilder
IntroductionThe Structured Query Language is the most popular and commonly known database query language, so, it makes sense to use SQL to query a database. Providing support for Embedded SQL ensures that, a language has the means to query most database engines for information. When you use this particular type of SQL, the statements are directly embedded into the code, introduced by keywords specific to the language being used. These statements are put through pre-compilation which translate them into the equivalent functions or statements in the host language. For example, you can use embedded SQL in a C program as follows: EXEC SQL INCLUDE SQLCA ; EXEC SQL BEGIN DECLARE SECTION ; DBCHAR mDescription[32] ; DBINT mItemNumber ; EXEC SQL END DECLARE SECTION ; ... EXEC SQL SELECT product_description INTO :mDescription FROM product_master WHERE product_no = :mItemNumber ; ... printf( "Product No: %d, Product_description: %s", mItemNumber, mDescription) ; EXEC SQL is the keyword used by C to identify SQL statements. Otherwise, the SQL statements are similar to the ones found in a database administrator's handbook. Writing Embedded SQL is very easy in PowerBuilder as it automatically detects SQL keywords, making special keywords redundant. The only thing you need to do is terminate the SQL statements with a semicolon (;).
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |