The title says it all, I need to converta string into a varialbe so that I can gain another value. here is the code so far: - sub ValidateValues()
-
-
DFData = "DatadField1,DatadField2,DatadField3,DatadField4,DatadField5"
-
DFDataArry = split(DFData,",")
-
-
DFTitle = "DF1Title,DF2Title,DF3Title,DF4Title,DF5Title"
-
DFTitleArray = split(DFTitle,",")
-
-
dim DFF, DatadField, DF, Title
-
-
for DfLoop = 0 to DfLoopCount
-
-
DFF = DfLoop + 1
-
-
if GetValue(DFDataArry(DfLoop)) = "" then
-
AddErrorMess("Value for" & GetValue(DFTitleArray(DfLoop)) & "has not been entered.")
-
end if
-
-
response.Write( DFDataArry(DfLoop) )
-
-
next
-
-
if errormess <> "" Then
-
-
response.Write("<p class=""red"">" & errormess & "</p>")
-
-
end if
-
-
end sub
-
-
function AddErrorMess(errmess)
-
-
if errormess = "" then
-
errormess = errormess & errmess
-
else
-
errormess = errormess & "<br>" & errmess
-
end if
-
-
end function
-
-
Function GetValue(sItem)
-
-
GetValue = sItem.Value
-
-
End Function
As you can see I have a lop that goes through the 5 different variables.
Any Ideas?
Cheers
1 3869 Frinavale 9,735
Recognized Expert Moderator Expert
Even after looking through your code I don't understand what you are trying to accomplish.
It is always a good idea to specify the Type expected for a variable...it's also a good idea to use better variable names than something like "DFF".
Anyways, I think you're interested in checking out Reflection. I'm not sure though because I don't have a clear understanding of what you're trying to do or Why.
-Frinny
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Richard Hollenbeck |
last post by:
I'm trying to write some code that will convert any of the most popular
standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan
1908) and compare the first with the second and calculate days, months, and
years. This is not for a college course. It's for my own personal
genealogy website. I'm stumped about the code. I'm working on it but not
making much progress. Is there any free code available anywhere? I know it...
|
by: Eric Lilja |
last post by:
Hello, I've made a templated class Option (a child of the abstract base
class OptionBase) that stores an option name (in the form someoption=) and
the value belonging to that option. The value is of the type the object is
instantiated with. In my test program I have Option<std::string> and
Option<long>. Here's the code for OptionBase and Option along with a small
helper function. In the code are comments describing my problem, look
closely...
|
by: DC Gringo |
last post by:
How can I convert this pubLatest to a date with format "m/d/yyyy"?
Dim pubLatest As New Date
pubLatest = Me.SqlSelectCommand1.Parameters("@pubLatest").Value
--
_____
DC G
|
by: manmit.walia |
last post by:
Hello All,
I am stuck on a conversion problem. I am trying to convert my
application which is written in VB.NET to C# because the project I am
working on currently is being written in C#.
I tried my best to convert it, but somehow the app does not work. I am
also not getting any errors when I complie thus, letting me know I am
on the write track. Basically what I want to do is edit,add,delete, and
update an XML file in a DataGrid. Below...
|
by: a.frank81 |
last post by:
I have problems with this Code:
Public Sub SetPropertyValue(ByVal strPropertyPath As String, ByVal obj
As Object, ByVal Value As Object)
.....
Dim t_PropertyInfos() As System.Reflection.PropertyInfo =
(t_obj.GetType).GetProperties
For ii = 0 To t_PropertyInfos.Length - 1
If t_PropertyInfos(ii).Name = t_strProperty Then
t_PropertyInfos(ii).SetValue(t_obj, Value, Nothing)
| |
by: cmdolcet69 |
last post by:
Public ArrList As New ArrayList
Public bitvalue As Byte()
Public Sub addvalues()
Dim index As Integer
ArrList.Add(100)
ArrList.Add(200)
ArrList.Add(300)
ArrList.Add(400)
ArrList.Add(500)
|
by: Hvid Hat |
last post by:
Hi
I want to highlight (make it bold) a word in some text I'm getting in XML
format. My plan was to replace the word with a bold (or span) tag with the
word within the tag. I've found the code below and it works fine as long
as I'm not adding tags around the to parameter. Can anyone explain to me
why it doesn't work with tags? And it needs to be XSLT 1.0.
This works: X<xsl:value-of select="'little steak'"/>X
This doesn't work:...
|
by: Steve |
last post by:
I am having problems getting values out of an array. The array is set
as a global array and values are pushed into it as they are read from
a JSON file using a "for loop". When the "for loop" is finished I want
to convert the array into a string which can be used by another
function. My attempt to do this is not working. The script looks like
this:
heights=;
function getElevationInter(latv,lngv) {
var script =...
|
by: =?Utf-8?B?cm9uZSBtYXRpYXM=?= |
last post by:
I have the same task to do but everytime I tried to parse my code I get a
null value returned after executing "dtMaterials.WriteXml(swMaterials);". I
am using the following code: Hope you can hep me out with this.
Thanks.
DataTable dtMaterials = new DataTable();
StringWriter swMaterials = new StringWriter();
swMaterials = null;
string strMaterials = string.Empty;
|
by: Miro |
last post by:
How can I convert this part of the line:
Me.dgvmyData.Columns.Item("txtCellName") ' "txtCellName"
which is within this line -
Me.dgvmyData.Sort(Me.dgvmyData.Columns.Item("txtCellName"),
System.ComponentModel.ListSortDirection.Ascending)
To read something like:
Me.dgvmyData.Columns.Item( nonQuotedVariable )
So I do not have to use a "String" variable to specify the column name.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |