From: Chris M. <Chr...@te...> - 2003-04-03 11:37:40
|
Hello, I am using the approach described below for a new module I'm writing, = and I ran into a problem with object keys during a save. My spops objects = have the datasource key defined and fetch works fine, but saves only half = work. The data gets inserted into the table fine but then I get an error = saying sdbname.object_keys does not exist, which of course is true. I = filtered through the modules and docs and got around it by passing the skip_object_key =3D> 1 with my save, but I'm wondering, is this right? = It seems to me that all object key info should be kept in the same spot, regardless of where the data tables reside. Having said that, I don't = know much about what object keys are for, so maybe I'm way off base... Anyway, just thought I'd ask. Thanks, Chris McDaniel -----Original Message----- From: And...@Be... = [mailto:And...@Be...] Sent: February 20, 2003 3:51 AM To: Chris McDaniel; ope...@li... Subject: AW: [Openinteract-help] second db connection Hi Chris, you are almost right: - yes, you can define more datasources in your server.ini / = server.perl like this [db_info seconddb] db_owner =3D username =3D auser password =3D apassword dsn =3D host=3Dbigbox.dbs.com db_name =3D adbname driver_name =3D mysql sql_install =3D long_read_len =3D 65536 long_trunc_ok =3D 0 - to access this, you do not have to do anything special in your = handler - all you have to do is add a key to the SPOPS definition ( i.e. conf/spops.perl ) like this: 'datasource' =3D> 'scounddb', Hope this gets you up and running, regards, Andreas -----Urspr=FCngliche Nachricht----- Von: Chris McDaniel [mailto:Chr...@te...] Gesendet: Donnerstag, 20. Februar 2003 09:20 An: 'ope...@li...' Betreff: [Openinteract-help] second db connection Hello, Hope I'm not making a nuisance of myself, but I have yet another = question. In the server.ini it says things like: [datasource] default_connection_db =3D main and [db_info main] which makes me think that you could have other non-default datasources = and do a [db_info whatever] type statement. I'm not sure if this is = something that is meant to be done, but if so, are there any docs on it? If not, = what would I need to add to my ini file and how would I access this = secondary DB from within a handler? Thanks!=20 Chris McDaniel ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ openinteract-help mailing list ope...@li... https://lists.sourceforge.net/lists/listinfo/openinteract-help |