DannyRitiu
Member
Hello,
I have created a String variable in VBScript. I don't know the String's length, because it is changing during Runtime. But let's say it's max. 512 chars.
Know, I want to transfer the characters of this string in a DB, which has one single array of bytes (1024 chars, to make sure the string fits).
I have tried the following script:
Dim i, myString, stringLength, stringByte
'...Preparation of myString...
For i = 1 To stringLength
stringByte = Mid (myString, i, 1)
SmartTags ("MyDB.MyArray")(i) = Asc (stringByte)
Next
This works fine, if the stringLength is <100 if it is more than or equal to 100, the script just doesn't do anything.
Can anyone explain this to me. Or can you provide a better way to extract the bytes from a VBScript String and copy them in a DB.
(I am working with Siemens Step7 v5.5+SP1 and WinCC flexible Advanced 2008 + SP3)
I have created a String variable in VBScript. I don't know the String's length, because it is changing during Runtime. But let's say it's max. 512 chars.
Know, I want to transfer the characters of this string in a DB, which has one single array of bytes (1024 chars, to make sure the string fits).
I have tried the following script:
Dim i, myString, stringLength, stringByte
'...Preparation of myString...
For i = 1 To stringLength
stringByte = Mid (myString, i, 1)
SmartTags ("MyDB.MyArray")(i) = Asc (stringByte)
Next
This works fine, if the stringLength is <100 if it is more than or equal to 100, the script just doesn't do anything.
Can anyone explain this to me. Or can you provide a better way to extract the bytes from a VBScript String and copy them in a DB.
(I am working with Siemens Step7 v5.5+SP1 and WinCC flexible Advanced 2008 + SP3)