473,386 Members | 1,820 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.

set a field to subject

cnn.Open()

Dim sql As String
sql= "select * from users where username='" &_
TextBox1.Text & "' and password='" & TextBox2.Text & "';"

Dim dt As New DataTable()
i have problem downstaires

Dim dausers As New OleDb.OleDbDataAdapter(sql, cnn)

dausers.Fill(dt)

If dt.Rows.Count > 0 Then

Dim subject As String = dt.FIELDS("defaultmnu")

'************************************************* ****
'PREVIOUS LINE I WANT TO FINT FIELD DATAFAULTMNU AND SET
'IT TO SUBJECT. HERE I HAVE A PROBLEM how can 1 do that

Select Case subject

Case "BASKI"
Me.Hide()
Dim frmbaski As New frmbaski()
frmbaski.Show()
frmbaski.Text = "Baski Giris Formu"
Case "STOK"
Me.Hide()
Dim FrmStok As New FrmStok()
FrmStok.Show()
Case "MUHASEBE"
Me.Hide()
Dim Frmmuhasebe As New FrmMuhasebe()
Frmmuhasebe.Show()

End Select

Else
MsgBox("No users",MsgBoxStyle.Critical, "Office")

End If

Nov 20 '05 #1
1 1017
The problem is that you are looking at the field definition in the
datatable. It doesn't know what row you wish to look at. I am assuming
that you want the value from the first row returned? If so, the following
should work.

Dim subject As String = dt.rows(0)("defaultmnu")
"SALIH ATAOZ" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
cnn.Open()

Dim sql As String
sql= "select * from users where username='" &_
TextBox1.Text & "' and password='" & TextBox2.Text & "';"

Dim dt As New DataTable()
i have problem downstaires

Dim dausers As New OleDb.OleDbDataAdapter(sql, cnn)

dausers.Fill(dt)

If dt.Rows.Count > 0 Then

Dim subject As String = dt.FIELDS("defaultmnu")

'************************************************* ****
'PREVIOUS LINE I WANT TO FINT FIELD DATAFAULTMNU AND SET
'IT TO SUBJECT. HERE I HAVE A PROBLEM how can 1 do that

Select Case subject

Case "BASKI"
Me.Hide()
Dim frmbaski As New frmbaski()
frmbaski.Show()
frmbaski.Text = "Baski Giris Formu"
Case "STOK"
Me.Hide()
Dim FrmStok As New FrmStok()
FrmStok.Show()
Case "MUHASEBE"
Me.Hide()
Dim Frmmuhasebe As New FrmMuhasebe()
Frmmuhasebe.Show()

End Select

Else
MsgBox("No users",MsgBoxStyle.Critical, "Office")

End If

Nov 20 '05 #2

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

Similar topics

0
by: Saya | last post by:
Hi all, I am trying to solve the follwoing issue. I need to send emails writte in Chinese, and in HTML format. I have the HTML format at Chinese characters in the body working, using the...
6
by: Susan | last post by:
Is there any way to take one of the fields from the form and use that as your subject line.. right now I have a default subject line entered - but would rather have the subject be the information...
5
by: Larry | last post by:
I have a form that submits some js created data through a formmail script. One field of the form is a text box for the person's name. I'd like the subject line of the resulting email to be "Some...
3
by: John M | last post by:
I'm lost on somethingthat I feel ought to be simple - getting the contents of a field! The database relates to school students and their subjects. The current record has as its source a query...
3
by: Don Stevic | last post by:
Hey there I have beentrying to get a windows form to send an email thru outlook and cannot find the right code. Does anyone know how to do this? Thanks *** Sent via Developersdex...
4
by: RA | last post by:
Hi How do I disable it if the user pressed a button: asp:imagebutton id="btnHome" onclick="test()" runat="server" What I want to have is that if someone presses this button then the required...
1
by: Richard Rosser | last post by:
Greetings. I know not one word of Javascript and wondered if there was an easy way to pre-populating a form field in a similar manner to populating an eMail 'subject' field? - The following...
5
by: Richard Rosser | last post by:
Greetings. I know not one word of Javascript and wondered if there was an easy way to pre-populate a form field in a similar manner to populating an eMail 'subject' field? - The following...
1
realin
by: realin | last post by:
Hiya all, I m using pop3.class.php5.inc class from php classes I am using their simple script, but i cant really get the sender information in the headers. Wht can be the error, i am able to...
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...
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: 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
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.