BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

newbie - making join queries writable

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases
View previous topic :: View next topic  
Author Message
JS
Guest





PostPosted: Wed Jun 25, 2003 7:23 pm    Post subject: newbie - making join queries writable Reply with quote



As I understand it, not all sql queries can be made writable. If I
have a TDBGrid that displays the results of this query:

select table1.field1, table2.field2 from table1, table2, where
table1.field3=table2.field3

Then the user cannot make changes to the values in those fields.

Am I understanding that correctly? If so, is there an accepted
workaround? All I could think of was to have multiple TQuery objects
on the form with multiple DBEdit fields and keep changing the sql
statements to duplicate a join statement.

Any better ways?

This is with Delphi 5 and odbc access to a mysql database server.

Thanks,
Back to top
Sundial Services
Guest





PostPosted: Wed Jun 25, 2003 8:59 pm    Post subject: Re: newbie - making join queries writable Reply with quote



JS wrote:

Quote:
As I understand it, not all sql queries can be made writable. If I
have a TDBGrid that displays the results of this query:

select table1.field1, table2.field2 from table1, table2, where
table1.field3=table2.field3

Then the user cannot make changes to the values in those fields.

Am I understanding that correctly? If so, is there an accepted
workaround? All I could think of was to have multiple TQuery objects
on the form with multiple DBEdit fields and keep changing the sql
statements to duplicate a join statement.


This type of query is not updatable. You can't open a "live query view" on
it.

What you can do, however, and what I'd recommend anyway that you do, is to
run the query, put the results into a local table of some kind {or just
store 'em in memory}, update them there, and then .. if the user presses
"OK" .. execute separate queries to update the actual data.


----------------------------------
Fast automatic table repair at a click of a mouse!
http://www.sundialservices.com/products/chimneysweep

Back to top
Greg Gailer
Guest





PostPosted: Sun Oct 29, 2006 9:01 am    Post subject: Re: Rave Reports Reply with quote



Jean Botes wrote:
Quote:
Hi

What is the most effective way to send data to a report and print it?

I print barcodes but the text is cut of, although it is complete in the
database.

Prints: 'ebenha'
In database reads: 'ebenhaezer vneck'

Any help will be apreciated, thanks
Jean


Hi Jean,

I have set up parameters in my Rave reports (the help file tells you
how) and then pass the values from the delphi program using the:
SetParam('Parameter',String);
function. The parameters are passed as string so you have to convert
them first if they are anything other than that.
I don't know if this is the most effective way but it was simple for me
to use.
Greg
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.