151

(2 replies, posted in General)

ahhh, thanks!!!

152

(2 replies, posted in General)

Here's how to replicate the bug:

Save button only works once.

You create a save button that doesn't close the form
You edit the memo
you save it
it saves

you change something
you save it
it doesn't save to mysql

hey Dmitry, i was able to get the ini file working, but i have a question with the colors:


Form1.TableGrid1.dbIndexToID(i) = 1 then Form1.TableGrid1.Cell[0,i].Color := clGreen;

In this case how do i point out that the id i want is on table1.id_2 ?

Thanks Dmitry, i'll try it soon smile

Hey guys, i am still messing arround with MVDB and the questions i have is:

- Can i color a tablegrid line without displaying the item id in that tablegrid?

Example: i have an ID that goes from 1 to 5, 1 being green, 2 blue, 3 yellow, 4 orange, 5 red, But i don't want the table grid to show anything other than a name from another table.
Can i get a script to higlight that specific lines? i was able to do it, but i had to tell the tablegrid to show the id that defined the colors.


- Can i add an external txt for options?

If i wanted to add different users to determine some pre-settings , can i use something like an txt file that i can modify a line or something so i can get different results?

Eg. I have User 1, and he already has his name predefined when he creates a new worksheet, but i want user 2 to get access to the interface , but instead of having it predefined with user 1, i want to tell MVDB to go to an txt file, look at line 1 for instance, and if there's a 1, the combobox for the name is id=1, but if it's 2, the id=2 etc....

Can these be done?
Many thanks

156

(1 replies, posted in General)

nevermind, sometimes my brain freezes and i need to ask stupid questions

(table.colum = 0) solved the problem

157

(1 replies, posted in General)

Hey everyone, if i have a combobox with some values that i don't use, for instance, if i have a list , and if i have a bool check to inditace that an item is inactive, how can i filter the combobox to show up only active (unchecked) items
Cheers

158

(4 replies, posted in SQL queries)

that worked like a charm

But i can't find the right syntax for multiple cases

Nevermind, forgot the "  , " at the end

159

(4 replies, posted in SQL queries)

didn't work, but i'll try again later. cheers

160

(4 replies, posted in SQL queries)

Hey guys, i'm wondering, is there a way to get a workarround an SQL query where i have this boolean check box , i inserted the boolean table on the sql report, but it shows 0 or 1 instead of YES or NO.
I tried this:

CASE test.answer WHEN 1 THEN 'yes' WHEN 0 THEN 'no' ELSE '' END

but i can't seem to make it work on sql report.
any ideas?

161

(4 replies, posted in Script)

Okay thanks Dmitry, just need to finish a few things, also i have been wanting to buy Visual Database for a long time, i'm sick of using virtual machines and changing the clock all the time so i can use it in trial mode smile

162

(4 replies, posted in Script)

hi Dmitry, i don't have a project per say, i'm just exploring , i got a customer who wants a database but since i'm a lamer programmer i'm trying to do what he wants in Visual Database, if i can do it i'll buy the program , make the database, and earn a little bit in the process..

I managed to get a work arround by doing this:

SELECT
test.id,
test.id_names


FROM
Assistencia




WHERE

(CASE WHEN {cbcriado} = 1 THEN test.id_Local = 1 and test.id_Local1 = 2 ELSE 1=0 END) or
(CASE WHEN {cbcriado} = 1 THEN test.id_Local = 2 and test.id_Local1 = 1 ELSE 1=0 END) or
(CASE WHEN {cbcriado} = 1 THEN test.id_Local = 1 and test.id_Local1 = 1 ELSE 1=0 END)

But, for instance, in test.Id_names i only see the ID of the table , not the name itself.
If i remember , i had to use something like Left outter join, but i can't remember the code correctly so when i do a sql query search i end up with a correct table.

163

(4 replies, posted in Script)

Hey guys.

Is there any way i can do an exception on search?

For instance, i have two combo boxes on a record.
I want to search for everything that is on combobox1, but if combobox 2 has a value of 2 for instance, it can show up on that same record if combobox1 has a different value than the search button)

Eg:.

I want to search for people that live in Lisbon only
But if there's someone that lives in oPorto city, but is visiting Lisbon, i want it to show up on that search too...

ComboBox 1 - Lisboa , Porto, Braga , Etc....
ComboBox 2 (Visiting) - Lisboa, Porto, Braga, Etc...

IF Combobox1 - (not lisboa) and Combobox 2 Lisboa then show record.


How do i put this in real practise?

164

(3 replies, posted in Script)

Hi Dmitry, i have the same question, but instead of adding 1.23 at the calculated field, i want the calculated field to get the value at the first ID from a table, if i can do so, i can edit the "VAT" field inside the program instead of going to the calculated field all the time

165

(2 replies, posted in Reports)

Hey guys, i have a strange bug, i got 3 combo boxes, two have a child, they are:

TIPO , MARCA, MODELO (Type, Brand, Model)

And i am using SQL Report because i want to report a table grid with a few values, and the only way i was able to do this is via Report (SQL)

So... about these 3 combo boxes

here's part of the script that fetches this info:

tipo.tpo
marca.marca
modelo.model

LEFT OUTER JOIN tipo on assistencia.id_tipo = tipo.id
LEFT OUTER JOIN marca on assistencia.id_marca = tipo.id
LEFT OUTER JOIN modelo on assistencia.id_modelo = tipo.id

Note: the tipo marca and modelo are all in their own table.

When i preview the report only the Tipo shows up, the Marca and Modelo are not present...
If i do the same but using the automatic Report (without the sql) i can see all the info correctly.

Is this a bug or am i doing something wrong?

166

(5 replies, posted in Script)

i deleted it, but i'll rewrite it again as soon as i have time, i am using a "clear" funcion like: dbitemid = 0 for each combobox, this way i'll have to re choose everything again anyway

167

(6 replies, posted in Reports)

OKay, so , i created a calculated field for my "boolean value" in this case i have 3, and i'll name them :

CASE Assistencia.taxaurg WHEN 1 THEN 'SIM' WHEN 0 THEN 'NÃO' ELSE '' END
CASE Assistencia.backup WHEN 1 THEN 'SIM' WHEN 0 THEN 'NÃO' ELSE '' END
CASE Assistencia.reincidencia WHEN 1 THEN 'SIM' WHEN 0 THEN 'NÃO' ELSE '' END

for now on, the reports will allways look at the fields "assistencia.taxaurgencia, backup and reincidencia" as SIM and NÃO right?

As for the strftime('%d/%m/%Y', datefield) , i added strftime('%d/%m/%Y', assistencia.data) and gave me an error.

i still want to send you my project since you didn't received it last time, but i want to change some fields to english so you can understand how the DB works.

168

(6 replies, posted in Reports)

ah... i was looking at the report section, thanks

169

(6 replies, posted in Reports)

Silly question, where is the "Calculated Field" ?
many thanks

170

(5 replies, posted in Script)

Don't know why but... list out of bounds...

171

(3 replies, posted in General)

yes, but i managed to do it , using navicat i just copied all the table entry's and now i have a mysql database functioning with both MVD and a test interface in PHP , very nice

172

(5 replies, posted in Script)

let me try wink

173

(3 replies, posted in General)

Hi there Vasco, you can use Navicat Premium tongue

174

(3 replies, posted in General)

Hey guys, i wanted to try MySQL on my test database, since i want to use php i'll probably use mysql from the start, but in the meanwhile for my tests i would prefer it i migrate what i have instead of inserting (almost) 50 users by hand.
Can you guys point me in the right direction?
Cheers

175

(5 replies, posted in Script)

Hey everyone, i got a from with 3 combo boxes, they have the previous combo box as a parent cb, , lets say they are called:

CB1 , CB2 and CB3

CB1 is the type
CB2 , Brand
CB3 Modelo

In front of each cb, i have a + new form , button, it opens a new form that allows me to add a new type, brand or model, but if i do so i have to "reset" the previous combo box in order to select the new item in the new combo box.
Is there a way to counter this?