[odb-users] executing native sql queries

Lidia Kalinovsky lidia at lemur-soft.com
Tue Jul 9 09:06:41 EDT 2013


thanks a lot - will try it.


On Tue, Jul 9, 2013 at 3:30 PM, Boris Kolpackov <boris at codesynthesis.com>wrote:

> Hi Lidia,
>
> Lidia Kalinovsky <lidia at lemur-soft.com> writes:
>
> > db = create_db(<new_db>);
> > db->execute("insert into Activity (wrntyID) Select zwrntyID from " + <old
> > db> + ".dbo.ZActivity");
> >
> > Clear it does not work as I don't know how to relate to old db ( by path
> > ??? ).
>
> You could attach the old database:
>
> db->execute ("ATTACH DATABASE /path/to/old.db AS old");
> db->execute ("insert into Activity (wrntyID) Select zwrntyID from
> old.ZActivity");
>
>
> > Is there some way to get result of execute ( not only number of rows
> > affected ) ?
>
> You can use a native view to handle a result set of a native SELECT
> statement. See Chapter 9, "Views" for details.
>
> Boris
>



-- 
Software integration and outsourcing services,
Lemur-Soft, Giv'at Nili
Israel, 37825
Phone : (+972) 545748325
Fax : (+972) 775345383
Email : lidia at lemur-soft.com
Web: www.lemur-soft.com


More information about the odb-users mailing list