|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am writing a asp page that prints out barcodes that will be used in a scanning process.
The string that needs to be converted to barcode 128B should be converted using a refzcode tabel. This tabel is stored in a MSSQL database and is loaded into an array refz(94,1). When I try to acces the array from within a function the array seems to be empty Accessing the array from the normal asp page reveals that the array is filled with the refzcode table. Here is the code: dim zoek, submit, klantnaam, categorie, documentsoort, memo, id, naam, telk, lpCount, RefZ(94,1), strValue <SCRIPT LANGUAGE="VBSCRIPT"> //*************************************************************************************** //*** //*** VBSCRIPT to convert the string value from the database to Code128B format. //*** //*************************************************************************************** Function Convert128(strValue) Dim StrTemp, Code128Sum, intTemp128, lpArray, RefZCode, i Code128Sum = 0 For i = 1 To Len(strValue) StrTemp = Left(strValue, i) StrTemp = Right(StrTemp, 1) For lpArray = 0 To UBound(RefZ) If StrTemp = RefZ(lpArray, 1) Then intTemp128 = CInt(RefZ(lpArray, 0)) End If Next Code128Sum = Code128Sum + (i * intTemp128) Next Code128Sum = (104 + Code128Sum) mod 103 RefZCode = RefZ(Code128Sum, 1) Convert128 = Chr(193) + (id) + RefZCode + Chr(200) End Function </SCRIPT> When i store a hard value in the Convert128 Function value it comes out of the function, this means the function return a value. What am i doing wrong. GreetZ, Cire |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > No value from array in function. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|