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

Help needed-Code Check-Education


The following code is fired on a (webform) datagrid select event. I am
filling textboxes (that are NOT part of the datagrid) with the cell
contents of the selected row. All text boxes are being populated
correctly, except for the last two; txtNotes and txtConfNotes, which do
not get populated at all. Moving the order around does not help.

If e.Item.Cells(6).Text.Equals(" ") Then
txtBPhone.Text = ""
Else
txtBPhone.Text = e.Item.Cells(6).Text
End If
If e.Item.Cells(7).Text.Equals(" ") Then
txtWorkExt.Text = ""
Else
txtWorkExt.Text = e.Item.Cells(7).Text
End If
If e.Item.Cells(8).Text.Equals(" ") Then
txtClientCell.Text = ""
Else
txtClientCell.Text = e.Item.Cells(8).Text
End If
If e.Item.Cells(9).Text.Equals(" ") Then
txtNotes.Text = ""
Else
txtNotes.Text = e.Item.Cells(9).Text
End If
If e.Item.Cells(10).Text.Equals(" ") Then
txtConfNotes.Text = ""
Else
txtConfNotes.Text = e.Item.Cells(10).Text

There is data in the datagrid cell for the selected row, and when I step
through, it passes the if statements fine and executes the else portion
of the statement.
The only other thing that I can add is that the datatype is TEXT in the
SQL table this data is being pulled from. All other fields are of type
char. I remember something from an earlier ASP project that I worked on
where I had to open a connection with rs.Open SQL, oconn,1,3 in order to
read text datatype fields. Could this be the same thing?

I am using the following for the connection
Dim sqlcmd0 As New SqlClient.SqlCommand()
Dim sqlcon As New SqlClient.SqlConnection()
Dim ds As New DataSet()
Dim da As New SqlClient.SqlDataAdapter()
sqlcon.ConnectionString =
"Server=SERVER;UserID=USER;password=PASSWORD;Datab ase=DATABASE"
sqlcmd0.Connection = sqlcon
sqlcon.Open()

Any ideas?

Aaron
Nov 20 '05 #1
0 790

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

Similar topics

4
by: *** HAWK | last post by:
I'm trying to make a music CD webpage (eg hmv.com) using ASP. I want it to follow these guidelines: All visitors should be able to obtain a list of 1 - all CDs in the database listed by A-Z by...
2
by: robert4 | last post by:
I am new to CSS and am trying new things and am stuck at 4 am. The site in question is http://www.robert4.com/test/fitting.html It is just a test page for me to practice with for a bit. My...
8
by: Stephen | last post by:
I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored...
7
by: ChadDiesel | last post by:
Hello everyone, I'm having a problem with Access that I need some help with. The short version is, I want to print a list of parts and part quantities that belong to a certain part group---One...
2
by: MichaelH | last post by:
Hi all, I am writing a program that has to draw musical notes on a staff. To do this I need to draw Ellispses (representing the notes) on a horizontal line and rotate them slightly (by 15...
8
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
9
by: smartbei | last post by:
Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with...
0
by: shantanuaggarwal | last post by:
Hi,, I have one following question that whether attributes can help me in resolving this problem: I have one base class called Employee and I have 3 classes which inherit it: EmployeeA...
1
by: Joel Fireman | last post by:
Help Needed: Upgrade Fedora 4 / Apache 2 to PHP 5.2.x from 5.0.4 I've been testing Joomla as a content manager for the County offices, and it looks pretty good. Unfortunately, I decided to...
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: 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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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.