What is the datatype of Ip and how is the data stored.
If I can make a guess ( since you have not supplied enough information )
the data is stored as an IP address ( xxx.xxx.xxx.xxx ) and you want to
increment just the last octet
Example
if you have 168.192.100.010 you want it to become 168.192.100.011
Since data conversion can't know how to do math on a string like this,
you need to retrieve the IP,
parse out the last octet,
increment it
then but the string back together
and insert it inyo the database.
Thank You
Donald Burr
C.I.O.
Nationwide Auction Systems
City of Industry, California
Voice: (xxx) xxx-xxxx Ext. 248
Fax: (xxx) xxx-xxxx
Cel: (xxx) xxx-xxxx
E-Mail: dburr@n... <mailto:dburr@n...>
-----Original Message-----
From: John Bracken [mailto:jb410002@e...]
Sent: Wednesday, March 06, 2002 4:08 PM
To: professional vb
Subject: [pro_vb] Converting Data Types
Could someone please help!!
I'm close to pulling what little hair I have left out!!
I'm trying to query an Access 97 database to get the latest value of
field"IP"
I thenwant to add 1 to this value when a new record is created, and have
this value displayed in a textbox.
what currently happens is that on the click event, the query is displayed
in the textbox
Dim sqlQuery As String
Private Sub cmdIssue_Click()
Data1.Recordset.OpenRecordset
Data1.Recordset.AddNew
sqlQuery = "SELECT MAX([IP+1]) As Num FROM Version2"
Text1.Text = (sqlQuery)
End Sub
Can anyone point me in the right direction?
Once again, Thanks, & Regards
John