Search found 195 matches

by bill-lancaster
Monday 26th July 2021 12:49pm
Forum: General
Topic: griview data event, change sort order
Replies: 1
Views: 1785

Re: griview data event, change sort order

This seems to do the trick. Public Sub gdvMaster_Sort() Dim sOrder As String If gdvMaster.Columns.Ascending Then sOrder = gdvMaster.Columns[gdvMaster.Columns.Sort].Text Else sOrder = gdvMaster.Columns[gdvMaster.Columns.Sort].Text & " DESC" Endif hResultMaster = hConn.Find("master&...
by bill-lancaster
Monday 26th July 2021 11:59am
Forum: General
Topic: griview data event, change sort order
Replies: 1
Views: 1785

griview data event, change sort order

I've been using the data event in gridview, the data source is a mysql database. It all works fine. When changing the sort order of a column in the database result, how is the Data event triggered? Public Sub Button1_Click() hResultMaster = hConn.Find("master", "ORDER BY Narrative&quo...
by bill-lancaster
Saturday 10th July 2021 11:58am
Forum: General
Topic: How to generate an ordinal number
Replies: 19
Views: 9464

Re: How to generate an ordinal number

I like the not so dirty solution, thanks Bruce and Cogier.
by bill-lancaster
Saturday 10th July 2021 11:15am
Forum: General
Topic: How to generate an ordinal number
Replies: 19
Views: 9464

Re: How to generate an ordinal number

Since I'm looking at day values of a date,
Select Case day_number MOD 10
Case 1
st
Case 2
nd
Case 3
rd
Case else
th
End Select

I guess this will do it, a bit messy though
by bill-lancaster
Saturday 10th July 2021 9:25am
Forum: General
Topic: How to generate an ordinal number
Replies: 19
Views: 9464

How to generate an ordinal number

Is there an available method to convert say "5" to "5th" or "23" to "23rd"?
by bill-lancaster
Saturday 1st May 2021 2:30pm
Forum: General
Topic: Drag & drop
Replies: 1
Views: 1847

Re: Drag & drop

OK, got it!

Code: Select all

Public Sub PictureBox1_MouseDrag()
  If Mouse.Left Then
    Drag.Icon = Picture["icon:/32/add"] 
    Last.Drag(Drag.Icon.Image)
  Endif
End
by bill-lancaster
Saturday 1st May 2021 12:47pm
Forum: General
Topic: Drag & drop
Replies: 1
Views: 1847

Drag & drop

I can't see how to do this, it's probably very simple. I have a picture box with a thumbnail of a photo. I want to place a copy of the file in a particular directory using drag n' drop I don't want the drag.icon to be the picture because they are large images. How best to show just a "+" i...
by bill-lancaster
Wednesday 14th April 2021 7:04am
Forum: General
Topic: mysql and British Summer Time problem
Replies: 8
Views: 5148

Re: mysql and British Summer Time problem

Time(mysql!DateTime) also shows British Summer Time
by bill-lancaster
Monday 12th April 2021 4:16pm
Forum: General
Topic: mysql and British Summer Time problem
Replies: 8
Views: 5148

Re: mysql and British Summer Time problem

Either the value is adjusted before writing to the db or the adjustment is made when reading the db.
I favour the latter, CDATE() displays the correct (local) time value.
Thanks again.
by bill-lancaster
Monday 12th April 2021 4:09pm
Forum: General
Topic: mysql and British Summer Time problem
Replies: 8
Views: 5148

Re: mysql and British Summer Time problem

Yes, you're right, in fact the time values in the sql database are correct, its when they are displayed as a string that the problem occurs. So, when displayed in gridview (gdvTest),or in string Svar the time values are wrong. hResult!DateTimeEvent (an sql date-time field) is correct when printed to...