473,499 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convertion

shivabisoi
3 New Member
HI,

I am storing a value in database table like [0-9]{2}[a-zA-Z]{3},But My problem is that at the time of accessing this value in grid view it should be converted int NNCCC .[0-9]{2} means it convert in to NN [a-zA-Z]{3} means it convert CCC
N-Numeric,C-Character
Expand|Select|Wrap|Line Numbers
  1. Protected Sub btnButton_ServerClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnButton.ServerClick
  2.         Dim input, str As String
  3.         Dim l As Integer
  4.         Dim i, j, n As Integer
  5.         input = Text1.Value
  6.         str = ""
  7.         l = 6
  8.         While l < input.Length
  9.             j = Integer.Parse(input.Substring(l, 1))
  10.             For i = l - 5 To l - 3
  11.                 If input.Substring(i, 3) = "0-9" Then
  12.                     For n = 0 To j - 1
  13.                         str = str & "N"
  14.                     Next
  15.                 ElseIf input.Substring(i, 3) = "A-Z" Then
  16.                     For n = 0 To j - 1
  17.                         str = str & "C"
  18.                     Next
  19.                 End If
  20.  
  21.             Next
  22.             l = l + 8
  23.         End While
  24.         Text2.Value = str
  25.     End Sub


This code is working on Two text box Text1 and Text2.When I Enter value in Text1 i get output on Text2.But My problem is that How can i get value from database and display in gridview.
Apr 14 '10 #1
2 893
MrMancunian
569 Recognized Expert Contributor
So? What do you want from us then? Do you already have code? Is there even a question?

Steven
Apr 14 '10 #2
Frinavale
9,735 Recognized Expert Moderator Expert
A GridView will display the data that it is bound to.
You need to retrieve the data from the database first before you can bind the GridView to anything.

Please review the following article that outline how to use a database:
Database tutorial Part 1
Database tutorial Part 2[/quote]

-Frinny
Apr 14 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2159
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
1385
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
2218
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
1612
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
324
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
2088
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
3169
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
1409
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
2238
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
8986
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
7128
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
7169
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,...
1
6892
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...
0
5467
agi2029
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,...
1
4917
isladogs
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...
0
3096
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...
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.