To all,
Best regards.I submitted this problem about auto purge a database many days ago but there's no reply till now.If anyone has any solution,please reply as soon as possible.
Is aouto purging possible in Visual Basic 2005 Express? How can I do it or get related codes?
Your help will be greatly honoured.
Zerin
4 1245
Best regards.I submitted this problem about auto purge a database many days ago but there's no reply till now.If anyone has any solution,please reply as soon as possible.
Is aouto purging possible in Visual Basic 2005 Express? How can I do it or get related codes?
Um... can you please explain what you mean by "auto-perging"? (By the way, in English at least, it's more likely to be "p urging" than "perging".
Um... can you please explain what you mean by "auto-perging"? (By the way, in English at least, it's more likely to be "purging" than "perging".
Killer42 my frnd !
I solved the problem on the front-end by VB 2005.I'm pasting the code sample here:
[PHP]Private Sub autoParge(ByVal oledbConn As OleDbConnection )
strSQL = " DELETE * FROM INSPECTION WHERE INT(Datediff('d ',DATE,now()))> 30 "
sqlCommand = New OleDbCommand(st rSQL, oledbConn)
Try
oledbConn.Open( )
sqlCommand.Exec uteNonQuery()
Catch ex As Exception
MsgBox(ex.Messa ge)
Finally
oledbConn.Close ()
End Try
End Sub[/PHP]
Here, INSPECTION is a table of data,DATE is the time inserted in one column of the table (related to the data appearance in the table) and this module has to be called from where it should be.
Hey, good to see you got it sorted out.
However, I'm sure you know by now that I hate to let anything go by without commenting. :) So, I do have a couple of questions/comments: - Is the Int( ) function necessary in the SQL string? I thought that DateDiff would already return an int. (I'm not telling you - just asking, as I'm too lazy to check).
- I think that by using DATE as a field name you are setting yourself up for potential problems in the future. Because in MS Access the DATE (or DATE( )) function is the equivalent of VB's Now( ).
- I just love the colour-coding produced by the PHP tags. I'm starting to think maybe I should use PHP instead of CODE to tag my code on TheScripts.
Hey, good to see you got it sorted out.
However, I'm sure you know by now that I hate to let anything go by without commenting. :) So, I do have a couple of questions/comments:- Is the Int( ) function necessary in the SQL string? I thought that DateDiff would already return an int. (I'm not telling you - just asking, as I'm too lazy to check).
- I think that by using DATE as a field name you are setting yourself up for potential problems in the future. Because in MS Access the DATE (or DATE( )) function is the equivalent of VB's Now( ).
- I just love the colour-coding produced by the PHP tags. I'm starting to think maybe I should use PHP instead of CODE to tag my code on TheScripts.
Well, - As I'm new in VB,when the result of the line with DataDiff didn't work properly, I tried INT and then it worked out.So, I don't know........... ......actually.
- And thanks for letting me know about the DATE() function.I don't want myself to be screwed up in future......... ...so,I think I'll change it.
- I just used the PHP tech today and it looks really nice.
Hey,can you prescribe me any tutorial that will help me developing myself faster in VB 2005 (with Access) ?
Actually I had been a Database guy,so in VB I seem to be lost myself.Please help.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Lew |
last post by:
Hi all,
I'm trying to create a page that has a user-selectable page auto-refresh
option (IE 5.5). Essentially, it's a page that contains a checkbox, when
the user checks the checkbox, I'd like the page to auto-refresh every 4
seconds....if the user un-checks the checkbox, I'd like to turn off the auto
refresh.
The page is as follows:
|
by: Steve Barker |
last post by:
Hi guys!
In Visual Studio .NET, I like to enable auto-generation of XML documentation
on the project properties screen, by adding an XML file name under
"Configuration Properties" --> "Build" --> "XML Documentation File". This
way, I get warnings in the task list about public methods I have written that
do not have XML comments (launched by typing "///") associated with them.
This works really well, and I get a list of methods I still...
|
by: Tom |
last post by:
I am trying to store information into a table that has an auto
increment field. There is currently no data in the table. Using the
code below I cannot insert data into the table. I get an error telling
me that "Number of query values and destination fields are not the
same."
If I add a value for the auto increment field to the SQL String the
data is entered into the table with no problems but obviously the auto
increment field now...
|
by: Geoff Cayzer |
last post by:
At http://www.blueclaw-db.com/tips_tricks.htm I came across a section
which is included below and was hoping for some comment on the
article.
--------------
Almost never use this auto-number field as the primary key of the
table.
If you are thinking of hiring an Access programmer or consultant ask
|
by: Alpha |
last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key
column and the 2nd is a string. When I add a new row to the dataset to be
updated back to the database. What should I do with the 1st column ? (Below
I have a "1" in place for now). Also, Does the datase.AcceptChanges();
updates the changes to the database? Which command do I use to update the
changes in dataset back to the Access database table? Thanks, Alpha...
| |
by: S.Dickson |
last post by:
I had an access database that i use as an ordering system. I have a
form for entering customer details. When i add a new customer on the
form the customer number is an auto number that appears when i type in
the details.
I have just moved over to mysql server with access as the front end. I
have setup the sql tables with the customer number as autonumber.
When i go into the form and add a new customer it does not generate the
|
by: Zerin |
last post by:
Dear Friends,
I always appriciate the help of this forum.Today,I`m asking for another solution.
Can anyone tell me ........how to autopurge data stored ina database by VB 2005 Express? Can it be set as default as well as fetching frequency from the users? And can it be done by required free disk space (in term of %) ???
Looking forward for the ans.
Zerin
|
by: pravinnweb |
last post by:
can anyone tell me how to set auto height to outer div that is in green box id "gray-background" it should increase relatively to inner div "smbox" here is the css and html code it should work in FF, IE6 and IE7
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Employee Listing </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords"...
|
by: glasssd |
last post by:
Hi,
I was hoping someone might have some ideas on how I can hack around a problem I'm having with the auto-complete feature of the ComboBox.
I have a data entry application that uses a pair of ComboBoxes on the main entry screen. These are configured to use the Suggest Append auto-complete feature with the List Items as the data source.
Functionally, it works great and really helps speed up the entry process.
However it appears that when...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |