o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

How long does data need to be kept for -

A user of one of my wonderful apps notified me that an exception was being raised. The error is of course handled so the app keeps running.
The app stores data in a database and is purged and compacted on a daily basis. The maximum age for the data is can be set by the user as a number of days. IN the purge routine this number is converted from days to minutes to retain accuracy.
I use a Long at this point.
Anyway, the user reported that he was getting an Error 6 Overflow during the purge....

Here's the explanation I emailed to my "boss":

The Error 6 in purging the database is because they have a maximum age of nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine days
The maximum should not exceed one million four hundred and ninety one thousand three hundred and eight days.

I realise that I should have allowed for this when coding it but I would have thought that 4080 years I would have been more than adequate, but, if they want to be able to retain data for 2735978 years then I'll have to modify it.

 

Long data in sql tables -
How to keep long data in sql tables and will it be good to keep such long data in table or shall we use some other way to maintain it suppose i m having data of two pages of word documents how should i keep this data


Data type in API calls. -
Hi experts, ------------------------------ Public Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Long) As Long


An explanation needed. -
Private Type MENUITEMINFO cbSize As Long fMask As Long fType As Long fState As Long wID As Long hSubMenu As Long hbmpChecked As Long hbmpUnchecked As Long dwItemData As Long dwTypeData As String cch As Long End Type Can someone


COM Objects that return OUT values -
Ok, i know how to talk and send data into COM objects that you send data into. However, i have a few com objects that send OUT data, how do you handel these? Example HNGS.GetVersion outs 3 things long GetVersion( [out] long * VersionMajor, [out] long * VersionMinor,


Long vs Single -
Are there any advantage to using a Long rather than a Single? I need a data type that can store huge integers (> 100,000,000) and a Long does not suffice. I notice that the Long and Single both use 4 Bytes, so whats the tradeoff for using a Single rather than a Long? I realise th


long long in MSVC++ 6 -
What is long long's equivalent in MSVC++ 6. I have a long long in minGW (g++) and it compiles and runs correctly. I can't have a long long in VC++ so I tried long int anf int long, neight worked... any ideas? NOMAD


Line Continues -
Hey.. I was wondering... What's better? ALL SEPARATE Public A as long Public B as long Public C as long Public X as long Public Y as long Public Z as long IN GROUPS Public X as long, Y as long, Z as long Public A as long, B as long, C as long Line CONTINUES Public X


too many arguments -
I am getting an error message stating that I have too many arguments here, question is is this possible using a different syntax? Public Function WebLoadA2k2TextFields(cic As String, deploycost As String, rank As String, addairfare As Boolean,hhgdetatc As String, hhgultatc As String


Long number data type -
Hey all (again, sorry for all the questions ^^;; ) I'm just wondering if there's a data type or if one can be made for storing very long numbers, but being able to perform mathmatical calculations on them? (i.e. not a string). I want to use the Rnd function to generate a 20-digit


VC to VB -
Dear Friends, I want to convert this code in VB LV_ITEM* plvi = (LV_ITEM*) VirtualAllocEx(hProcess, NULL, 4096, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE) hear LV_ITEM defi is Public Type LV_ITEM mask As Long iItem As Long iSubItem A


Types -
what's a type? what does it mean when u declare a type? like this: Private Type BrowseInfo hWndOwner As Long pIDLRoot As Long pszDisplayName As Long lpszTitle As Long ulFlags As Long lpfnCallback As Long lParam As Long iImage As Long End Type


How can i update Long Binaries Data -
Dear all, If there's a field with Long Binary data type, how can i change the values to NULL. ( the field values is Picture data ) I used Ms. Access 2000 as my back end and VB 6.0 to developt my application. Regard, Noob


can we have data types for C structs and union in VB -
Hi I am having this structure in VC, can I have the same data type in VB, and how it will look like Thanks struct trevariant_struct { short NullInd; Long TreType; union trevariant_datatype { long VLong; double VDouble; ch


Random into array -
Hmm, how to explain this one. Well I have an empty array 'Data(100) as long'. I want to insert a value between 1 and 25 into all the array. But I want to make sure that there are four occurences of each value in the array at the end. ie, Data(1), Data(32), Data(40), Data(67) =


Receiving binary data via RS232 -
I am looking at using the serial port to receive and transmit data as follows: CTS pin 8 is received data which can be upto 20 binary bits long, RTS pin 7 unmodulated output upto 20bits long, TD pin 3 modulated output at 38khz upto 20bits long, The overall aim is to store them i


Huge Integers -
I am testing a bubble sort function that I wrote with large amounts of data. I am currently testing it with 100,000 data items. Because the BubbleSort is of Order n^2 I should get around 10 billion comparisons (swaps) being made. I am counting these swaps but I can't seem to hold


Internet Cache Dates -
Greetings and Salutations, I can get to my Internet cache and cookies but cannot get the last accessed dates. The code I am using gives me a long number for the dates. How can I get the dates in a proper format? Here is some of the code from the module: Public Type INTERNET_C


Data Types, making a new type (resolved) -
how would i make my own data type, like long, or integer, or string, except i would want it to be like 10000 characters long. is that possible?


API GURU NEEDED -File extension from Class Name -
Heres what I am trying to do. I am trying to store files in an access database by allowing drag and drop into an OLE container field. With the help of Beacon (from this site) I can take any file dropped in OLE container, and store it as long binary data in my access database. The ole c


how to use this -
I am a newbie in vb. and i am running vb6 at my place. I red many tips and code within vb. Like option explicit, private sub ...._event, or like these code The question I want to pose are ? 1. How I use that code or syntax in vb6 2. What does these mean ? Usage SetStartPage


StrechBlt in Windows XP -
Where can I find informations about API in Windows XP? I especially need function similar to StrechBlt. Or maybe only declaration of StrechBlt is a little bit diffrent in Win XP. I use something like this in Win 98: Declare Function StretchBlt Lib "gdi32.dll" (ByVal hdc


Longer than Long - Custom Data Types -
I'm trying to make a custom data type to that I can convert a program that uses long integers to use integers with a length of N bytes where N may be 64 or larger. I haven't a clue where to start as I've never used custom data types in VB


Why does'nt this work -
Code: Private curve_maps(11, 256) As Long Private sub Swap_um() Dim a As Long Dim b As Long Dim store As Long On Error GoTo CatchError '*** Flip Maps *** For a = 0 To 11 For b = 0 To 255 store = curve_maps(a, b) ' store info curve_maps(a, b) = cur


64k limit on Type -
I am using VB6. I am trying to use Type Statements to organize some Large Data in memory. I had seperate dim statements already, but I am rewriting the code to more organized blocks. Type SlotSetType lAR As Long lPR As Long sP


User Animation to AVI -
Hi.... I need to convert a file of this format into AVI. This is the layout of the file ================================= Public Type ActorFileHeader a1 As Integer a2 As Long a3 As Long a4 As Long End Type Public Type ACTORINFO dwStructSize As Long


How long is a piece of code -
Hello, I have a question for the forum and I would really appreciate as many perspectives as possible. My boss wants me to develop a new piece of software for the business and I need to have a guesstimate as to how long it will take to produce. He has asked me to create a soluti


4 byte numeric data -
hi, I need to store a 4 byte numeric data in a datatype, it is good to use Long, however, as my numeric data is unsigned, if I use Long, it will overflow, I don't want to use double because I only store whole integer, no floating point. So how could I store 4 byte unsigned numeric dat


Data Type Vb6 Access -
Data Type miss match error code 3464 Why do I have so many problems when I want to SQL either a primary key or auto number fields debug highlights corect data in variables Dim lngstaffid As Long set Tblstaffdata = dbbo.openrecordset("SELECT * from staff _ where staff


How long (Time) store Data on CD -
How long can data stored on a CD? If the CD is stored in a dark cool, dry place.... 5 years? So after 2.5 years copy the CD ? Why? CD photos.


help needed in RegEnumKeyEx -
hey Guys, I m getting an error while using this win Api in my VB pgm Public Declare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, lpcbName As Long, ByVal lpReserved As Long


Saving and Retrieving From Database -
I declare a custom data type that then holds a lot of data. Code: Type Entry Rank As Long Name As String Division As Integer WUs As Long TotalTime As String AverageTime As String WUChange As Long RankChange As String Compared As Bool


OLEDragDrop/Data.Files Problem -
Even though I have "On Error Resume Next" in the OLEDragDrop sub of my ListView, If I accidently drop a bunch of files and the My Computer icon, no files will be added to the list. What am I doing wrong? Here's my code: Private Sub lvwFiles_OLEDragDrop(Data As MSComctlLib.


Data types conversions -
How can i convert from (for example) long to char ? For example: i use api, which returned long value. How can i this value view in MessageBox function ?


parsing a block of text -
I have a binary file which takes a long time to read and parse the data so I decided to read a 2K block of data from the file and parse that block of data. Is this possible? If so, what would my data type be and how would I have a pointer to know where I am at? Sample of the record


Adding hDC to a custom control -
I'm trying to add the hDC attribute onto a custom picturebox control so I can use bitblt with it. This picturebox works perfectly fine, here's what I'm using for the hDC code. ================================== ================================== Private Declare Function B


Long is faster yet it's 4 bytes and integer is 2 bytes, and other data type questions -
I read in the MSDN library that a long data type should be used whenever possible because it is the processors native data type and therfore more efficient. Why is this if it's 4 bytes and the integer is 2 bytes? Also, it sayed you should only use decimal when absolutely neccessary wh


Cannot print -
I use Visual basic 6. I try to print the scale bar. But it cannot print out.But someone told me I can print the scale bar using BitBlt. Any body know about MapObjects GIS? Private Declare Function StretchBlt Lib "gdi32" _ (ByVal hDC As Long, _


Datacombo Boxs and making the list visible using code -
This works for Combo Box's, but not for a Data combo box. I was wondering if any one knows how to get the list to show on a Datacombo box. Thanks for your time Public Declare Function SendMessageLong Lib _ "user32" Alias "SendMessageA" _ (ByVal hwnd As Lon


Cards32.dll trouble -
Im working on a card game and ive placed the cards32.dll file in the location C:\Cards\cards32.dll and ive declared- Declare Function cdtInit Lib "c:\cards\Cards32.Dll" (dx As Long, dy As Long) As Long Declare Function cdtDrawExt Lib "c:\cards\Cards32.Dll" (ByVa


How do I ... icons in a context menu -
Hi all, I am implementing an ocx to handle context menues. I am at the point where I have to add icons near a specific subitem. I need something like Public sub ctxSetIcon(byval uid as long, mywonderfulicon as ????) dim retval as long dim lpmii as MENUITEMINFO with lpmii