. .

st4u

ST 4U 156: Setting up GLORP for Oracle in VA Smalltalk

November 9, 2011 12:23:38.110

Today's Smalltalk 4 You sets up connectivity for Oracle and GLORP on Windows for VA Smalltalk. There are few tricky parts to this, including the use of the correct ODBC definition. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

Loading GLORP.

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:


Today we'll set up connectivity to Oracle (using ODBC) so that we can use Glorp against Oracle from VA Smalltalk. The Oracle support in VA for GLORP uses ODBC, so that's why we are doing this. To get started, bring up the ODBC configuration tool, and set up access to your database (installing Oracle is beyond the scope of this tutorial). Make sure you use the Oracle drive, not the Microsoft one - the MS one does not play well with VA Smalltalk:

Oracle GLORP

Once you have that, you can connect to your database as follows:


login := Login new.
	database: OracleODBCPlatform new;
	username: username;
	password: password;
	connectString: 'orcl11g';
	yourself.

Make sure you use the proper connect string, which was set up when you configured Oracle. Next, login:


"login and logout"
accessor := DatabaseAccessor froLogin: login.
accessor login.

accessor logout.

If you specified a password, it'll login for you; otherwise, you'll get prompted.

Next time we'll start taking a real look at creating database descriptors, so that we can start interacting with tables using GLORP.

Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.

Technorati Tags: , , ,

Enclosures:
[st4u156-iPhone.m4v ( Size: 3638289 )]

posted by James Robertson

 Share Tweet This