[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Connection with GDL2

From: Frédéric PRACA
Subject: Connection with GDL2
Date: Wed, 20 Aug 2003 17:55:51 +0200
User-agent: Internet Messaging Program (IMP) 3.2.1

Hi everybody,
today I tried to make a sample (and simple) application using GDL2.
The goal of this application is to connect to a database and retrieve the names 
of the tables.
It seems that I didn't manage to connect to the database since the 
NSMutableDictionnary returning the table names is empty.
Here's how I tried :
- I created a .eomodel file containing only the AdaptorClassName 
(Postgres95Adaptor), AdaptorName (Postgres95) and the connection dictionnary 
(containing hostName, databaseName, username, password)
- in the source code, I created a EOModel from the .eomodel file
- retrieved an EOAdaptor from the EOModel
- retrieved an EOAdaptorContext from the EOAdaptor
- retrieved an EOAdaptorChannel using the context
- create a new EOModel and asked the channel to describeModelWithTableNames 
coming from describeTableNames
- Finally, used encodeInPropertyList and wrote this propertyList to disk
In the code, I've NSLog(%@) for each object described before. As a result, the 
dictionnary containing TableNames is empty.
What did I wrong ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]