|
Why thank you.
Luc Pattyn wrote: (and you could change font sizes to get different TB heights)
True, but could end up really, really ugly.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
HI,
I call a child form as such
dim frm as new childform
frm.showdialog()
I need for childform to be inside the MDIparent form without having it to go outside the scope of the Mdiparent
so before I call frm.showdialogue() i need to do something.
thanks alot
|
|
|
|
|
If you show the child form using ShowDialog, it cannot be an MdiChild.
|
|
|
|
|
Thanks,
what if I change it to show()
Can it be then a MdiChild and how
Best regard
|
|
|
|
|
Create the child instance, set the MdiParent property of the child instance to the parent form (Me if instaciating in the parent) who's IsMdiContainer should already be True , then call the instance's Show() method.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
That would be the normal way to show an MdiChild form, yes.
|
|
|
|
|
A modal form by it's nature is not part of the MDI. It is possible to contrain it's movement to within the MDI client area though. I wrote an article[^] about this - it's in C# but easily 'transposed'.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Here is the code that I am using:
DELETE from Agents WHERE Deleted = 'Y' AND DeletedDate < '" & System.DateTime.Now.Date.AddDays(-30) & "'"
The code deletes the correct records, but it also deletes records that are within the 30 days.
I.E. If I ran this today, in addition to the correct records, it will also delete records where DeleteDate is 7/15/2009 , 7/29/2009 , 7/19/2009, etc.
It does NOT delete dates 8/01/2009 through today..
Any ideas please?
|
|
|
|
|
your statement is implicitly using DateTime.ToString() which applies the regional settings, not necessarily what SQL needs. You should use an explicit ToString() and provide a formatting parameter that is compatible with SQL.
As an alternative, use a parameterized SQL statement; that would take a real DateTime, not a string. Hence no formatting problems at all.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
OK, I since have changed my statement to:
DELETE from Agents WHERE DeletedDate < " & Date.Now.Date & ""
Now it deletes nothing
|
|
|
|
|
Did you actually read my previous reply?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Sorry, I didnt explain well enough.
I changed the Data Type in my MS Access database to Date/Time and changed my statement to:
DELETE from Agents WHERE DeletedDate < " & Date.Now.Date & "
I would think that should work, but it doesnt delete any records.
|
|
|
|
|
Did you actually read my previous replies?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Obviously I am new to this and I didnt understand what you meant.
I thought that your last comment meant that I would be better off changing the data type to Date/Time, therefore I did that.
I appreciate your answers, but if you are going to be curt, please allow me to figure this out on my own or get help elsewhere rather than be insulted because I dont happen to know and understand everything that you do.
Thank you again for your assistance.
|
|
|
|
|
As you are not inclined to use DateTime.ToString() nor SqlParameter class, feel free to continue in any way you see fit.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thank you, but
did you read MY last post?
|
|
|
|
|
The comment Luc is trying to make is that "stuff" & date.now.date & "more stuff" will call the default ToString method of the Date object returned by Date.Now. More than likely, the string output by the default is confusing the database engine because it is expecting a different order. You should look into the overloads of ToString that take an format string argument and determine the format expected by the database.
Alternatively, you could use a parameterized query. I'm not big on the syntax, but it believe it would be something like 'DELETE your stuff WHERE DateToCompare < @date'. The actual syntax varies from database to database. Then you could use the OdbcCommand (or SqlCommand, or whichever version applies to your database) along with the Parameter class to go with your command. The OdbcParameter MSDN page has a good example of this.
|
|
|
|
|
I found someone who knew the answer to me problem.
The Field needed to be a Date/Time Field and the correct Delete statement is:
DELETE from Agents WHERE Deleted = 'Y' AND DeletedDate < #" & Now.Date.AddDays(-30) & "#"
The Pound Signs made all the difference.
Thank you for your assistance.
Rick
|
|
|
|
|
hi there,
i want to create a column that increments automatically when data for other columns are inserted. The data type for this column is varchar made of the following format based on some conditons
BD/00001/99A
EX/00002/00B
PS/00003/00A
the numbers between 00001-00003 will be incrementing each time a new data is inserted. others are conditions based, usually not changing.
any help would be appreciated
|
|
|
|
|
I would use two fields, one strictly an autoincrementing number, the other (the composite field you want) fully calculated from the available data.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
u mean using stored proc
(somevariable + autonumber) as Columnname, can u give me some hint, if u have
thank u in advance.
|
|
|
|
|
I saw in Dependency walker MSchrt20.ocx depending file and I searched in internet But I can't get all file.
Wt i post last time error was clear in my system. But In client system package not opening when I add a chart otherwise it will come.
Now how can i build setup.
|
|
|
|
|
You have to add the MsChrt20.ocx file to your installation and any files that it depends on. Seriously, I'd look into a different graphing package, such as ZedGraph[^].
|
|
|
|
|
Hi All,
My application run alwase with admin rights (Previlages). Write now i m in guest account and try to run my application with admin rights.
So how to Get Current Login User Name...
Thanks
If you can think then I Can.
|
|
|
|
|
Hi,
1.
Environment.UserName
2.
eg_Anubhava wrote: Write now i m in guest account and try to run my application with admin rights.
You can't. Guest has no rights whatsoever.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|