473,387 Members | 1,611 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.

Record In VB.NET

Dear Sir/Madame;
I have a VB.NET application accessing a SQL Server 2005 Database.
And I want to know how can I use a Record in VB.NET.
You would do me a favour if You send me a full description & some examples.


I'm looking forward to see your reply

Regards;
G. Malek
Sep 7 '06 #1
3 4090
what do u mean by record?
reading a record from the SQL DB?
Private Sub check_user_name()
Try
Dim val As String = Nothing
Dim com As SqlCommand
Dim rd As SqlDataReader

con.Close()
con.Open()
com = New SqlCommand("spn_tbln_Login_master_uname_check", con)
com.CommandType = CommandType.StoredProcedure
com.Parameters.Add("@u_name", Trim(txtUser_Name.Text))
rd = com.ExecuteReader
If rd.HasRows = True Then
While rd.Read
val = Trim(rd(0))
End While
End If
If val = Nothing Then
u_name_correct = True
Else
u_name_correct = False
End If
rd.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
End Sub
Sep 26 '06 #2
what do u mean by record?
reading a record from the SQL DB?
Private Sub check_user_name()
Try
Dim val As String = Nothing
Dim com As SqlCommand
Dim rd As SqlDataReader

con.Close()
con.Open()
com = New SqlCommand("spn_tbln_Login_master_uname_check", con)
com.CommandType = CommandType.StoredProcedure
com.Parameters.Add("@u_name", Trim(txtUser_Name.Text))
rd = com.ExecuteReader
If rd.HasRows = True Then
While rd.Read
val = Trim(rd(0))
End While
End If
If val = Nothing Then
u_name_correct = True
Else
u_name_correct = False
End If
rd.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
End Sub

I would like to create a deck of cards in an array with certain properties
like faceValue and cardSuit and inDeck(boolean)
it will be used for blackjack
is there a way to just create a record so that i can call it up like this

Dim cardArray(13,4) as string

for faceValue as int = 1 to 13
for suit as int = 1 to 4
' how can i declare array so that i can store .Suit ???
cardArray(faceValue,suit).Suit = suit
'how can i declare array so that i can store .Number ???
cardArray(faceValue,suit).Number = faceValue
next
next
Nov 10 '08 #3
Curtis Rutland
3,256 Expert 2GB
OK.
First, you've dug up a thread from 2006. Second, you've asked a question in it that has absolutely nothing to do with this thread. That's called thread hijacking and is not allowed on this forum.

If you need help, please create your own thread. Remember to use [code] tags when posting your code.

MODERATOR
Nov 10 '08 #4

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

Similar topics

4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
8
by: mark | last post by:
Access2000 How do I write a query that combines the CTC field from each record below into one record? I need to concatenate the CTC field with a separator, like below: ...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
0
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
1
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
2
by: Mark Reed | last post by:
Hi All, I have created a multi-user application at work which is working perfectly apart from a small problem which I believe to more a of a user issue (maybe some will set me straight on that...
11
khalidbaloch
by: khalidbaloch | last post by:
hi : all Friend i am a new member of this comunity as well in php myqsl i want learn that how to dispaly three or two record from a mysql table for example .. mysql table category has 21 columns,...
3
prn
by: prn | last post by:
Hi folks, I've got something that's driving me crazy here. If you don't want to read a long explanation, this is not the post for you. My problematic Access app is a DB for keeping track of...
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: 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...
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
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
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.