473,387 Members | 1,512 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,387 software developers and data experts.

Convertion from vb6 to vb.net

I have an application in vb6 converted to vb.net
During debugging it stops at the folloewing code

If RsORDRE.Fields("Kommentar").Value <> "" Then
strKommentar = RsORDRE.Fields("Kommentar").Value
Else
strKommentar = ""
End If

The error is <>"" where Kommentar is a varchar field in the database
regards
reidarT
Nov 21 '05 #1
4 1046
Reidar,

Are you sure it is not a DBNull.value?
What is mostly the problem in this kind of code.
(Not that I still know much about AdoDb)

Cor

"ReidarT" <re****@eivon.no>
I have an application in vb6 converted to vb.net
During debugging it stops at the folloewing code

If RsORDRE.Fields("Kommentar").Value <> "" Then
strKommentar = RsORDRE.Fields("Kommentar").Value
Else
strKommentar = ""
End If

The error is <>"" where Kommentar is a varchar field in the database
regards
reidarT

Nov 21 '05 #2
It is a DBNull if that means there is no data in this field for this record
How can I ommit the problem?
reidarT
"Cor Ligthert" <no**********@planet.nl> skrev i melding
news:uK**************@TK2MSFTNGP11.phx.gbl...
Reidar,

Are you sure it is not a DBNull.value?
What is mostly the problem in this kind of code.
(Not that I still know much about AdoDb)

Cor

"ReidarT" <re****@eivon.no>
I have an application in vb6 converted to vb.net
During debugging it stops at the folloewing code

If RsORDRE.Fields("Kommentar").Value <> "" Then
strKommentar = RsORDRE.Fields("Kommentar").Value
Else
strKommentar = ""
End If

The error is <>"" where Kommentar is a varchar field in the database
regards
reidarT


Nov 21 '05 #3
Reidar,

Probably, (I did not (do as I wrote) much AdoDb last times)

If RsORDRE.Fields("Kommentar").Value Is DbNull.value then

I hope this helps?

Cor

"ReidarT" <re****@eivon.no>
..
It is a DBNull if that means there is no data in this field for this record How can I ommit the problem?
reidarT
"Cor Ligthert" <no**********@planet.nl> skrev i melding
news:uK**************@TK2MSFTNGP11.phx.gbl...
Reidar,

Are you sure it is not a DBNull.value?
What is mostly the problem in this kind of code.
(Not that I still know much about AdoDb)

Cor

"ReidarT" <re****@eivon.no>
I have an application in vb6 converted to vb.net
During debugging it stops at the folloewing code

If RsORDRE.Fields("Kommentar").Value <> "" Then
strKommentar = RsORDRE.Fields("Kommentar").Value
Else
strKommentar = ""
End If

The error is <>"" where Kommentar is a varchar field in the database
regards
reidarT



Nov 21 '05 #4
Thanks alot
Reidar
"Cor Ligthert" <no**********@planet.nl> skrev i melding
news:Ok**************@TK2MSFTNGP10.phx.gbl...
Reidar,

Probably, (I did not (do as I wrote) much AdoDb last times)

If RsORDRE.Fields("Kommentar").Value Is DbNull.value then

I hope this helps?

Cor

"ReidarT" <re****@eivon.no>
.
It is a DBNull if that means there is no data in this field for this

record
How can I ommit the problem?
reidarT
"Cor Ligthert" <no**********@planet.nl> skrev i melding
news:uK**************@TK2MSFTNGP11.phx.gbl...
Reidar,

Are you sure it is not a DBNull.value?
What is mostly the problem in this kind of code.
(Not that I still know much about AdoDb)

Cor

"ReidarT" <re****@eivon.no>
> I have an application in vb6 converted to vb.net
> During debugging it stops at the folloewing code
>
> If RsORDRE.Fields("Kommentar").Value <> "" Then
> strKommentar = RsORDRE.Fields("Kommentar").Value
> Else
> strKommentar = ""
> End If
>
> The error is <>"" where Kommentar is a varchar field in the database
> regards
> reidarT
>
>



Nov 21 '05 #5

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

Similar topics

1
by: Petr Studenovsky | last post by:
Hello I made small GUI test program in Visual Basic NET for SQL communication. I need some help with these problems. problem 1) If I change some settings in datagrid from properties window...
0
by: Konstantin Kivi | last post by:
I have problems getting character set convertion to work in 4.1.4 gamma under linux. Can sombody point me to the online recource other than standard MySQL doc so that I get more information.
6
by: Chiller | last post by:
I'm in the process of writing a class that performs functions on a Distance object. The object is created by entering details as "Distance a (5, km)" or "Distance b (3, cm)" etc. I wish to write...
1
by: Vidar | last post by:
I have a problem in dotNET XSL convertion object. (XMLTRANSFORM) It won't convert UTF-8 to ISO-8859-1 I use this stylesheet for konvertion: <?xml version="1.0" encoding="ISO-8859-1"?> <!--...
0
by: McKoy | last post by:
Hi, I'm translating some code from C++ to C#, but I don't know how to change the code below to get it working under C# ...., I've tried explicity convertion, but without any results :( Please...
4
by: juli | last post by:
Good afternoon! I have an error while trying to convert to DateTime ,here is the code and the error: ArrayList al = new ArrayList(); temp_str=Line.Split(' '); al.Add(temp_str); //...
8
by: juli | last post by:
I am trying to convert an object of a class which is derived from collectionbase class.It's not working: while ((line = file.ReadLine()) != null && line.IndexOf(" ")!=-1) { al.Add(line); }...
0
by: isore | last post by:
Convertion php to asp.net : PB lecture fichier .ini URGENT URGENT URGENT URGENT URGENT URGENT J'ai un code en php (http://parisports.free.fr) mais le client veut le même en asp.net J'ai...
4
by: kaikai | last post by:
Hi, I've got a problem while trying to make my source code clean. In a template: template<typename T> class A { public: T data; };
24
by: ChaosKCW | last post by:
Hi I am reading from an oracle database using cx_Oracle. I am writing to a SQLite database using apsw. The oracle database is returning utf-8 characters for euopean item names, ie special...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...

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.