I have the following application setting [Name: PO / Type: Integer / Scope: User / Value: 100001]
This setting increments every time the user logs into the application and is displayed in a textbox - it is working fine on 4 different workstations - but on workstation 5 it is only displaying 1 then 2 then 3 and so on instead of 100001,100002,100003 . . . ..
There is a mixture of operating systems anything from XP to Windows 8. Workstation 5 is Windows 7.
Is there something obvious I'm missing?
Thanks,
MB
VB.NET / APPLICATION SETTINGS
Page 1 of 14 Replies - 156 Views - Last Post: 29 November 2012 - 09:57 AM
Replies To: VB.NET / APPLICATION SETTINGS
#2
Re: VB.NET / APPLICATION SETTINGS
Posted 29 November 2012 - 07:51 AM
We would have to see how you are storing the values, incrementing the values, and displaying the values.
#3
Re: VB.NET / APPLICATION SETTINGS
Posted 29 November 2012 - 08:30 AM
OK - lets see if this helps - have the following variable under Public Class Main:
Thanks,
MB
Dim poIncNo As Integer
Then in the formLoad Event I have:
txtBx_poNo.Text = genPoNo(currUser)
Private Function genPoNo(ByVal user As String) As String
Dim strNum As String = "1"
poIncNo = My.Settings.po + 1
Dim poNum As String
Select Case user
Case uFred
poNum = strNum & userId + CStr(poIncNo)
Return poNum
End Select
End Function
In Application.Settings I have:
Name = po
Type = integer
Scope = user
Value = 100001
Thanks,
MB
This post has been edited by modi123_1: 29 November 2012 - 08:48 AM
Reason for edit:: highlight the text and just click the 'code' button in the text editor
#4
Re: VB.NET / APPLICATION SETTINGS
Posted 29 November 2012 - 09:00 AM
As an aside it is a bad idea to store the purchase order number in the 'my.settings'. If you want the most current PO number then you should be polling the database where the POs are stored... this, as you mentioned, generates duplicate PO numbers.
What is the datatype of " My.Settings.po"?
Why are you using & and + in this line?
Speaking of - what is the purpose of 'strnum' in that function?
What is the datatype of " My.Settings.po"?
Why are you using & and + in this line?
poNum = strNum & userId + CStr(poIncNo)
Speaking of - what is the purpose of 'strnum' in that function?
#5
Re: VB.NET / APPLICATION SETTINGS
Posted 29 November 2012 - 09:57 AM
modi123_1,
The purchase order schema is as such: 14100001 - 1 leading number / 4 - user / 100001 - purchase order
This works for us, in that there is no possibility of duplicates because as mentioned earlier every time the purchase order program is loaded - the 100001 is incremented by 1 (which is and has been working on 4 other machines without a hitch).
The dataType of "My.Settings.po" is Integer . . . . .
MB
The purchase order schema is as such: 14100001 - 1 leading number / 4 - user / 100001 - purchase order
This works for us, in that there is no possibility of duplicates because as mentioned earlier every time the purchase order program is loaded - the 100001 is incremented by 1 (which is and has been working on 4 other machines without a hitch).
The dataType of "My.Settings.po" is Integer . . . . .
MB
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|