|
there is no attachment between da and myCommand,
if you are trying to get the data,
use mysqldatareader with mysqlcommand.
dim dr as mysqldatareader
dr = cmd.executeQuery()
if dr.read() then
msgbox "success"
else
msgbox "incorrect login"
end if
or if you want to use mySQLDataAdapter then use it with mysqldataset
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|
|
.... nope... i dont want to get the data, i just want to read it to check if certain data is present in the database, and give a true or false result (user exists or not in the database)
your code help a bit but whats the declaration for the CMD.executeQuery.
Cheers and thanks
|
|
|
|
|
case closed, finaly its done.
~
Dim sSQL As String
Dim conn As New MySqlConnection("server=xxxxxx;" _
& "user id=xxxxxxx;" _
& "password=xxxxxxxx;" _
& "database=xxxxxxxx")
Dim cmd As MySqlCommand
Dim drData As MySqlDataReader
Try
conn.Open()
sSQL = ("SELECT * FROM tblSysLogin WHERE username='" & TextBox1.Text.ToString & "' and password='" & TextBox2.Text & "'")
cmd = New MySqlCommand(sSQL, conn)
drData = cmd.ExecuteReader()
If drData.Read() Then
MsgBox("success")
Else
MsgBox("incorrect login")
End If
Catch myerror As MySqlException
MessageBox.Show("Error Connecting to Database: " & myerror.Message)
End Try
so simple and so complicated.... lol thanks for all you help guys. Cheers
|
|
|
|
|
LegionFX wrote: thanks for all you help guys
Glad you got it working
|
|
|
|
|
glad you got it working
cheers
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|
|
please i want help from any body here
i want to take mcpd exams
for that i want help from any body here have(test king exams (70-536)
-(70-526) for visual basic2005
any body help me
that first time i enter that site
and i hope the help me
and promise any body here to help all after i finish
i wait in my email sadagc2002@yahoo.com
good times with best site
by
saad badr
|
|
|
|
|
Help with what? Whats on the exams? How to register for them? ...
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
thanks for respond
iam searching about the testking and questions
iwant to training on exam before enter
iam searching about e xam but a not found yet
thanks
saad badr
|
|
|
|
|
There are free ones out there, but you get what you pay for. They suck and they don't give you the same experience your going to get in the testing lab. They simulate what topics are going to be covered on the exam, but they have no idea exactly what questions you're going to see.
The best way to pass is to go into the books and practice the techniques, not the tests...
|
|
|
|
|
This is why exams are a joke. People cram for them on the web, know nothing and still pass.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am using a DGV to display data from a DataTable but I've been unable to figure out how to prevent the user from clicking on a cell and selecting it. I'd use DataGridView.Enabled = False if it also didn't prevent the use of the scroll bar.
I also checked out the DataGridView.SetStyle(Selectable, False) member but that is protected so I can't touch it. Does anyone have any suggestions?
I've disabled all editing abilities (adding, deleting, reordering, etc) for it. Setting DataGridView.ReadOnly = true also doesn't work for me.
---- UPDATE:
This problem can be solved with
Private Sub DataGridView3_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView3.SelectionChanged
DataGridView3.CurrentCell.Selected = False
End Sub
-----
Gr,
Mightor
A paralytic chicken ran away with my sig.
-- modified at 15:03 Saturday 5th May, 2007
|
|
|
|
|
hi,
Can any one help with creating a splash screen for an vb.net 2005 application which after a specified interval diappears and the mdiparent form in shown.
If someone help me it would be great help for me.
Thanks
|
|
|
|
|
You'll need to create a form to act as your splash screen. Once you've done that goto Project > Properties. Make sure the Application tab is selected. At the bottom there should be a combobox which is labeled 'Splash Screen'. Just select the form you'd like to use. That's it! If you'd like to adjust the minimum time it displays (I believe the default is 2 seconds) you can set 'My.Application.MinimumSplashScreenDisplayTime' in the new event of your form.
|
|
|
|
|
VS.NET 2005 (not the Express Editions) already comes with a SplashScreen template form. All you have to do is right-click your project in the Solution Explorer, click Add -> New Item..., then double-click the SplashScreen form. Give the form a name, and after it's added to your project, right click the form in the Solution Explorer and click View Code. The instructions for modifying the form are in the code comments.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
It isn't that hard to create a splashscreen from scratch, though.
Dave Kreskowiak wrote: VS.NET 2005 (not the Express Editions) already comes with a SplashScreen template form
Is there anyway to get the splashscreen template for the Express Editions?
|
|
|
|
|
Paul Conrad wrote: It isn't that hard to create a splashscreen from scratch, though.
No, it isn't, for us anyway. For someone who doesn't understand that the startup form also contains the app's message pump, it's a bit confusing.
Paul Conrad wrote: Is there anyway to get the splashscreen template for the Express Editions?
it's not downloadable from anywhere. You'd have to lift a copy of the template files from a higher edition of VS.NET.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak wrote: it's not downloadable from anywhere. You'd have to lift a copy of the template files from a higher edition of VS.NET.
After a bit of googling, that is the conclusion I pretty much came to
Dave Kreskowiak wrote: For someone who doesn't understand that the startup form also contains the app's message pump, it's a bit confusing.
Yep, but it would be a bad little learning exercise either
|
|
|
|
|
Hi,
You can try OPACITY property of your form it might help u.
Put this code in a loop:-
Opacity = i/100.0;// decrease opacity
Thread.Sleep(30);
Regards,
Sumit
|
|
|
|
|
vb.net
i have a form, which is mdi-container. how do i close all open forms in this container-form?
|
|
|
|
|
may be i didnt get your problem exactly...
u want to close all the opend mdi child forms
jst in close button click event write application.exit.
it will close all the opened ald hidden forms....
|
|
|
|
|
it's like this:
i want to close all open child forms in my mdi-container form - but not the container form - , when i confirm an openfiledialog.
the child forms show the contents of a database, and when i confirm the openfiledialog a new database is used in my programme. but i don't want the already open child forms to show the contents of the database used before, so all forms should be closed.
i tried it like this, but without success:
<br />
dim c as control<br />
for each c in form1.controls<br />
if type of c is form then<br />
dim f as form = ctype(c, form)<br />
f.close<br />
end if<br />
next<br />
|
|
|
|
|
Every form, if it's an MdiParent, has an MdiChildren property that contains all of the child forms it has eopn.
Dim x As Integer
For x = 0 To (MdiChildren.Length) - 1
Dim childForm As Form = CType(MdiChildren(x), Form)
tempChild.Close()
Next x
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
|
|
go to hell.... throw ur system away.. its no use for u....
|
|
|
|