473,378 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

If - then does not work in .net - please help

edb
Hi,
I have a previous validation If-then that works fine.
If online form has input from the input tag I want to
insert it into tables in SQL. Interestingly, I have
built an RDBMS in SQL and need to insert to the lookups
based on someone filling out a textbox.

My problem is that the code does recognize my if-then
statement based on a variable I predefined. I get no
errors and no posting onto the database. I REMOVE THE IF-
THEN STATEMENT AND i DO GET POSTING ONTO THE DATABASE.

Here is my code

Dim ClientCustInfo, ClientProdAreaInfo,
ClientProgDescInfo, ClientProductInfo, ClientPlatformInfo,
ClientCountriesInfo AS Integer
ClientCustInfo = 1
ClientProdAreaInfo = 1
ClientProgDescInfo = 1
ClientProductInfo = 1
ClientPlatformInfo = 1
ClientCountriesInfo = 1

If ClientCustInfo + ClientProdAreaInfo +
ClientProgDescInfo + ClientProductInfo +
ClientPlatformInfo + ClientCountriesInfo = "6" Then
Do my insert script - 'not available here

end if
Please, please help me with this.

Make my day a happy one.

Thx bunches,
edb
Jul 21 '05 #1
1 2336
Take out the Quotes around 6. It's evaluating to a string.

Do you have Option Strict Turned off, it shouldn't even let this compile.
"edb" <m1**@dm2000.com> wrote in message
news:04****************************@phx.gbl...
Hi,
I have a previous validation If-then that works fine.
If online form has input from the input tag I want to
insert it into tables in SQL. Interestingly, I have
built an RDBMS in SQL and need to insert to the lookups
based on someone filling out a textbox.

My problem is that the code does recognize my if-then
statement based on a variable I predefined. I get no
errors and no posting onto the database. I REMOVE THE IF-
THEN STATEMENT AND i DO GET POSTING ONTO THE DATABASE.

Here is my code

Dim ClientCustInfo, ClientProdAreaInfo,
ClientProgDescInfo, ClientProductInfo, ClientPlatformInfo,
ClientCountriesInfo AS Integer
ClientCustInfo = 1
ClientProdAreaInfo = 1
ClientProgDescInfo = 1
ClientProductInfo = 1
ClientPlatformInfo = 1
ClientCountriesInfo = 1

If ClientCustInfo + ClientProdAreaInfo +
ClientProgDescInfo + ClientProductInfo +
ClientPlatformInfo + ClientCountriesInfo = "6" Then
Do my insert script - 'not available here

end if
Please, please help me with this.

Make my day a happy one.

Thx bunches,
edb

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
33
by: Savas Ates | last post by:
in asp page im getting this error how can i solve it.. yesterday the codes work but i setup visual studio 6.0 now it doesnt works..
12
by: Frank Hauptlorenz | last post by:
Hello Out there! I have a DB2 V7.2 Database (Fix11) on Win 2000 Professional. It was before a NT 4 based Domain - now it is a Win 2000 Domain. The database server is a domain member. Now...
6
by: Bob Day | last post by:
VS 2003 The documentation says " Nothing keyword represents the default value of any data type" this is simply not true and causing a lot of problems. 1) Consider an SQL table of 3 columns: ...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
2
by: Serg | last post by:
Hi, all I have a trouble. I have a WebService that uses MCpp assembly that uses some MFC classes. Everything perfectly works on my machine. But when i install web site on clients machine it...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
5
by: Pat | last post by:
Hi ASP Gurus, Please help me. Autocomplete works fine when the control does not have the focus when the page load. But when I put the focus on page load, then autocomplete does not work. I even...
1
by: jabbari | last post by:
Hello, Please Help us...! I have a big problem ,so i searched on google and other search engine ,then I realized that so many other people have the same problem and they, all, have'nt been able to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.