My memory getting shorter.
ClickOnce doesn't work in VB.net 2008 Express.
The fix: Install Visual Web Developer 2008 and it will.
Still funniest on YouTube: Starwars Kid
Friday, September 18, 2009
Tuesday, September 08, 2009
Cannot open or convert an Access 97 or Access 2000 database in Access 2002, in Access 2003, or in Access 2007
Thank you Microsoft for making my life a mess.
Having old applications running Access 97 DBs isn't fun. After change computer it wasn't possible to view the databases in Access 2003 anymore (Applications open DBs without problem). The best part is the Error message: it says the databases aren't in Access format or it might be corrupt. Hey, YOU made Access97 remember?
Finally after a couple of hours searching the answers for my call for help was answered.
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL"
regsvr32 "c:\WINDOWS\system32\msrd3x40.dll"
How hard can it be?
Answer found at: IwillNeverUseAccessAgainIwillNeverUse...
Having old applications running Access 97 DBs isn't fun. After change computer it wasn't possible to view the databases in Access 2003 anymore (Applications open DBs without problem). The best part is the Error message: it says the databases aren't in Access format or it might be corrupt. Hey, YOU made Access97 remember?
Finally after a couple of hours searching the answers for my call for help was answered.
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL"
regsvr32 "c:\WINDOWS\system32\msrd3x40.dll"
How hard can it be?
Answer found at: IwillNeverUseAccessAgainIwillNeverUse...
Wednesday, September 02, 2009
I'm been working on a CodeGenerator that creates code for a dll. Doing so I was in need for a Variable Name validator so the created code doesn't contain invalid variables or enums.
This is the function I created:
This is the function I created:
' Returns True if variable name is valid.
Function ValidateVariable(ByVal inData As String) As Boolean
Dim VbKeyWords() As String = {"AddHandler", "AddressOf", "Alias", "And", "AndAlso", "Ansi", "As", "Assembly", "Auto", "Binary", "Boolean", "ByRef", "Byte", "ByVal", "Call", "Case", "Catch", "CBool", "CByte", "CChar", "CDate", "CDbl", "CDec", "Char", "CInt", "Class", "CLng", "CObj", "Compare", "Const", "Continue", "CSByte", "CShort", "CSng", "CStr", "CType", "CUInt", "CULng", "CUShort", "Custom", "Date", "Decimal", "Declare", "Default", "Delegate", "Dim", "DirectCast", "Do", "Double", "Each", "Else", "ElseIf", "End", "EndIf", "Enum", "Erase", "Error", "Event", "Exit", "Explicit", "ExternalSource", "FALSE", "Finally", "For", "Friend", "Function", "Get", "GetType", "Global", "GoSub", "GoTo", "Handles", "If", "Implements", "Imports", "In", "Inherits", "Integer", "Interface", "Is", "IsFalse", "IsNot", "IsTrue", "Let", "Lib", "Like", "Long", "Loop", "Me", "Mid", "Mod", "Module", "MustInherit", "MustOverride", "MyBase", "MyClass", "Namespace", "Narrowing", "New", "Next", "Not", "Nothing", "NotInheritable", "NotOverridable", "Object", "Of", "Off", "On", "Operator", "Option", "Optional", "Or", "OrElse", "Overloads", "Overridable", "Overrides", "ParamArray", "Partial", "Preserve", "Private", "Property", "Protected", "Public", "RaiseEvent", "ReadOnly", "ReDim", "Region", "REM", "RemoveHandler", "Resume", "Return", "SByte", "Select", "Set", "Shadows", "Shared", "Short", "Single", "Static", "Step", "Stop", "Strict", "String", "Structure", "Sub", "SyncLock", "Text", "Then", "Throw", "To", "True", "Try", "TryCast", "TypeOf", "UInteger", "ULong", "Unicode", "Until", "UShort", "Using", "Variant", "Wend", "When", "While", "Widening", "With", "WithEvents", "WriteOnly", "Xor"}
If Len(inData) = 0 Then Return False 'Empty string
' Chk if 1st character is a numeric
Select Case inData.Chars(0)
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
' Not OK
Return False
End Select
' Chk for allowed characters _ 0-1, a-z, A-Z
Dim i As Integer
For i = 0 To Len(inData) - 1
Select Case Asc(inData.Chars(i))
Case 48 To 57, 65 To 90, 97 To 122 ' 0-9, A-Z, a-z
'OK
Case 95 '_
' Ok With _ but not only as _
If inData.Length = 1 Then Return False
Case Else
Return False
End Select
' Chk for Vb KeyWords
Dim j As Integer
Dim txt As String = LCase(inData)
For j = 0 To UBound(VbKeyWords)
' chk agains Keywords
If txt = LCase(VbKeyWords(j)) Then
Return False
End If
Next
Next
Return True
End Function
Function ValidateVariable(ByVal inData As String) As Boolean
Dim VbKeyWords() As String = {"AddHandler", "AddressOf", "Alias", "And", "AndAlso", "Ansi", "As", "Assembly", "Auto", "Binary", "Boolean", "ByRef", "Byte", "ByVal", "Call", "Case", "Catch", "CBool", "CByte", "CChar", "CDate", "CDbl", "CDec", "Char", "CInt", "Class", "CLng", "CObj", "Compare", "Const", "Continue", "CSByte", "CShort", "CSng", "CStr", "CType", "CUInt", "CULng", "CUShort", "Custom", "Date", "Decimal", "Declare", "Default", "Delegate", "Dim", "DirectCast", "Do", "Double", "Each", "Else", "ElseIf", "End", "EndIf", "Enum", "Erase", "Error", "Event", "Exit", "Explicit", "ExternalSource", "FALSE", "Finally", "For", "Friend", "Function", "Get", "GetType", "Global", "GoSub", "GoTo", "Handles", "If", "Implements", "Imports", "In", "Inherits", "Integer", "Interface", "Is", "IsFalse", "IsNot", "IsTrue", "Let", "Lib", "Like", "Long", "Loop", "Me", "Mid", "Mod", "Module", "MustInherit", "MustOverride", "MyBase", "MyClass", "Namespace", "Narrowing", "New", "Next", "Not", "Nothing", "NotInheritable", "NotOverridable", "Object", "Of", "Off", "On", "Operator", "Option", "Optional", "Or", "OrElse", "Overloads", "Overridable", "Overrides", "ParamArray", "Partial", "Preserve", "Private", "Property", "Protected", "Public", "RaiseEvent", "ReadOnly", "ReDim", "Region", "REM", "RemoveHandler", "Resume", "Return", "SByte", "Select", "Set", "Shadows", "Shared", "Short", "Single", "Static", "Step", "Stop", "Strict", "String", "Structure", "Sub", "SyncLock", "Text", "Then", "Throw", "To", "True", "Try", "TryCast", "TypeOf", "UInteger", "ULong", "Unicode", "Until", "UShort", "Using", "Variant", "Wend", "When", "While", "Widening", "With", "WithEvents", "WriteOnly", "Xor"}
If Len(inData) = 0 Then Return False 'Empty string
' Chk if 1st character is a numeric
Select Case inData.Chars(0)
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
' Not OK
Return False
End Select
' Chk for allowed characters _ 0-1, a-z, A-Z
Dim i As Integer
For i = 0 To Len(inData) - 1
Select Case Asc(inData.Chars(i))
Case 48 To 57, 65 To 90, 97 To 122 ' 0-9, A-Z, a-z
'OK
Case 95 '_
' Ok With _ but not only as _
If inData.Length = 1 Then Return False
Case Else
Return False
End Select
' Chk for Vb KeyWords
Dim j As Integer
Dim txt As String = LCase(inData)
For j = 0 To UBound(VbKeyWords)
' chk agains Keywords
If txt = LCase(VbKeyWords(j)) Then
Return False
End If
Next
Next
Return True
End Function
Subscribe to:
Posts (Atom)
MySQL to MariaDB
Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...
-
When converting an VB2008 application to VB2010 I run into trouble regarding COM objects while compiling. you get errors like: Error 1...
-
In a module you have declared a Structure or Enum that you will use through out a project. Module Module1 Public Structure dummy ...
-
Apache2 crashes on Ubuntu Linux 22.04.5 after Zabbix was updated to 7.0.26 During a upgrade of my Ubuntu server there was a new package for ...