ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 2nd, 2003, 07:49 AM
Cire Cire is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 Cire User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question No value from array in function.

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > No value from array in function.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway