Here is a copy of my script. The point is for users to enter data into the
card and the submit button have the data inserted into the database. The
sql works when submitted directly into the database.
on mouseUp
put field "Name" into tName
put field "Team" into tTeam
put field "Position" into tPosition
put field "Rushing" into tRushing
put field "Receiving" into tReceiving
get revOpenDatabases("MYSQL", "localhost", "test", root, root1)
put it into tDatabaseID
answer tName, tTeam, tPosition, tRushing, tReceiving, tDatabaseID
revExecuteSQL tDatabaseID,"insert into test.nflstats(Name, Team, Position,
Rushing, Receiving) values(tName, tTeam, tPosition, tRushing, tReceiving)"
end mouseUp
I have the tDatabaseID variable to make sure I am recording the Database ID
Thank you for your assistance, There will be a lot of progress once I get
past these elementary hurdles
All best Always
Fred
From: "Fred Giannetto" <[EMAIL PROTECTED]>
Reply-To: How to use Revolution <[email protected]>
To: [email protected]
Subject: Using a card to make modifications to database
Date: Tue, 04 Oct 2005 19:00:36 -0400
Hello,
Trying to have a card submit changes to MySQL database. The syntax for
revExecuteSQL requires me to use database ID.
How do I do this as the database ID is always changing. I have used the
revOpenDatabase function to get it but the ID did not seem to work (I have
the right priviledges) and I want the card to be able to apply changes
everytime without modifications.
All best Always
Fred
From: Ken Ray <[EMAIL PROTECTED]>
Reply-To: How to use Revolution <[email protected]>
To: Use Revolution List <[email protected]>
Subject: Re: Some Foolish questions
Date: Tue, 04 Oct 2005 15:26:19 -0500
On 10/4/05 3:10 PM, "Fred Giannetto" <[EMAIL PROTECTED]> wrote:
> Hello Everyone,
>
> 1) Absolute value question. Here is a copy of the script.
> I want input values over 10 to create a deficit in the Consumer and
Foreign
> fields. Example, a user puts 15 into the Reserves field. It is
subtracted
> from 20 putting the remainder into tReserves. tReserves is less then
10 so
> it has 10 subtracted from it, it is divided by 2 resulting in -2.5 into
> tConsumer but I only see 2.5.
Well, the script puts 'tShortfall / 2 into tConsumer', which would put
-2.5
into tConsumer, but when it goes into the field, you have 'put -tConsumer
into field "Consumer"', which puts "2.5" into fld "Consumer" because:
-tConsumer
is the same as
-1 * tConsumer
which is:
-1 * -2.5 = 2.5
So I think if you set it to put "tConsumer" instead of "-tConsumer" you
should get what you're expecting.
> 2. I am using the database property "move to previous record" for the
> previous record button and it is setup to access the correct query. I
have
> created two queries using Microsoft Access driver and Microsoft do
Access
> driver. I have attempted to connect with both of them and they exhibit
the
> same symptoms. I can only go forward and refresh. The MySQL
connection
> works without any problems.
What happens when you try to go to the previous record what happens - do
you
stay on the current one? Or do you get some other result?
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution