473,378 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Handling Hex Values

We have a database that collect serial numbers. These serial numbers
are input into the database as a string value (only the engineers know
its hex). Anyways what they would like to have happen is that the
serial number remain as hex but based on the entry increment a
quantity automatically so that only one number must be input to get
many entries made. Any suggestions?
Nov 12 '05 #1
2 5585
Here is an example of a function that reads a hex string and generates
values for the number of entries required. Example useage:
? HexIncr("1FF0", 16)

Function HexIncr(strStartHexValue As String, lngHowMany As Long)
Dim lngI As Long
Dim lngStartValue As Long

lngStartValue = CLng("&H" & strStartHexValue)
For lngI = lngStartValue To lngStartValue + lngHowMany - 1
Debug.Print Hex(lngI)
Next
End Function

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"sherah" <sh*****@fleetwoodgroup.com> wrote in message
news:40**************@news.egl.net...
We have a database that collect serial numbers. These serial numbers
are input into the database as a string value (only the engineers know
its hex). Anyways what they would like to have happen is that the
serial number remain as hex but based on the entry increment a
quantity automatically so that only one number must be input to get
many entries made. Any suggestions?

Nov 12 '05 #2
Thanks very much!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: xAvailx | last post by:
I have a requirement that requires detection of rows deleted/updated by other processes. My business objects call stored procedures to create, read, update, delete data in a SQL Server 2000 data...
3
by: James Foreman | last post by:
I've got a set of emails in a table, where sometimes they've failed to input the @ properly. Eg james.foreman'abcmail.co.uk How do I write a replace to deal with that? Also, I've got a set...
9
by: C# Learner | last post by:
Some time ago, I remember reading a discussion about the strengths and weaknesses of exception handling. One of the weaknesses that was put forward was that exception handling is inefficient (in...
1
by: DKode | last post by:
I find myself writing repetitive functions for handling null values from my DB like so: Private Function SetDateNull(ByVal p_date As Object) As Date If (TypeOf (p_date) Is System.DBNull) Then...
3
by: dhussong | last post by:
I'm trying to implement a generic exception handling routine that will write information to a text file at the time the exception occurred. I am using the Microsoft Application Block for Exception...
14
by: Mr Newbie | last post by:
I am often in the situation where I want to act on the result of a function, but a simple boolean is not enough. For example, I may have a function called isAuthorised ( User, Action ) as ?????...
4
by: Rob | last post by:
Hey all, So.. a simple FormView/SqlDataSource to handle inserting records into a table. The table has a primary key that the user enters (eg DiscountCode). If the user enters a duplicate the...
94
by: Chad | last post by:
On to top of page 163 in the book "The C Programming Langauge" by K & R, they have the following: char *strdup(char *s) { char *p; p=(char *)malloc(strlen(s)+1); if( p != NULL) strcpy(p,s):...
5
by: John | last post by:
Hi I have developed the following logic to handle db concurrency violations. I just wonder if someone can tell me if it is correct or if I need a different approach.Would love to know how pros...
0
by: dhyder | last post by:
I'm working on an admin page for a SQL Server 05 db. The page is in ASP.NET 2.0/C#. The db has multiple tables with foreign keys/constraints. I have multiple SqlDataSources and GridViews, which...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.