• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Database Connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Database Connection


  • Subject: Database Connection
  • From: "Sharayu Puranik" <email@hidden>
  • Date: 9 Dec 2004 12:15:34 -0000


hi all

thanx  Joakim  for ur previos reply
I have a problem with big discription........
-------------------------
now I m using RTArchivedSession class and RTQueryDataSource class for
making connection to SQL server

I m able to connect to database present on remote SQL server and fire a query
to display result in NSTableView

but I have done it by dragging these two classes to nib file and setting their
parameters

the  RTQueryDataSource class will act as datasource for NSTableView present
on window
-------------------------------
but I have to do this programatically....
so I created instances of  RTArchivedSession & RTQueryDataSource class on
nib file
on button click event I have written following code;

NSString *st = @"select * from DB1";
NSString *dbnm = @"DBDeadstock";
     
SessionClass *session1 = [[SessionClass alloc]init];
[session1 setSessionSource:RTSessionSource_Prompt];
[session1 session];
     
RTQDataSrc *dataSrc1 = [[RTQDataSrc alloc]init];
     
[dataSrc1 setDisplayErrors:TRUE];     
[dataSrc1 setAutoPerformQuery:TRUE];
[dataSrc1 setLoadDataOnAwake:TRUE];
[dataSrc1 setUpdateColumnTitles:TRUE];
[dataSrc1 setAddRemoveColumns:TRUE];

[dataSrc1 setDatabaseName:dbnm];

[dataSrc1 setQueryString:st];
     
[dataSrc1 setTableView:tb1];

---------------------
when I build and run it I m not getting any error nor results....

where SessionClass and RTQDataSrc are header files for instantiated classes

Now My Questions are
1. How to set session for RTQueryDataSource class thr code
2. how to execute the query
3. if it gets executed by setting 'autoquery' option TRUE...how to get returned
values of query ie result in some file or what......but not in table view cause I
want to retrieve particular values like row=2,col=4

can anybody help me as soon as possible

plz send the reply to this mail ID also

thank u




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: headers automatically bundled?
  • Next by Date: Build All
  • Previous by thread: Re: headers automatically bundled?
  • Next by thread: Build All
  • Index(es):
    • Date
    • Thread