473,508 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem on getting oledbcommand worked

Jak
I think I have set all the required parameters of the oledbcommand already,
but the procedure still refuse to proceed, it sayes that there must be one
or more parameters not set.

The following is the snippet of my codes:

'-----------------Interface----------------
Public Interface IDatabase
......
ReadOnly Property cnDatabase() As Data.IDbConnection

End Interface

'------------------class login-----------------------
Dim clsDatabase As IDatabase

Private Function Validate(ByVal User As String, ByVal Password As
String) As Boolean
Dim cmd As New OleDb.OleDbCommand()
Dim rs As Int16

cmd.Connection = clsDatabase.cnDatabase
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select count(*) from TLOGIN Where LoginID='" +
User + "' AND Passowrd='" + Password + "';"
' cmd.CommandTimeout = 30

rs = CInt(cmd.ExecuteScalar().ToString)
MsgBox(rs.ToString)

End Function

Best regards,

Jack Zhong
Jan 19 '07 #1
3 889
"Jak" <cn*******@yeah.netschrieb
cmd.CommandText = "Select count(*) from TLOGIN Where
LoginID='" + User + "' AND Passowrd='" + Password + "';"
"Password", not "Passowrd"

Armin
Jan 19 '07 #2
Hi Armin,

I am glad to see you back again, whatever you think about OT post.

:-)

Cor

"Armin Zingler" <az*******@freenet.deschreef in bericht
news:e3****************@TK2MSFTNGP03.phx.gbl...
"Jak" <cn*******@yeah.netschrieb
> cmd.CommandText = "Select count(*) from TLOGIN Where
LoginID='" + User + "' AND Passowrd='" + Password + "';"

"Password", not "Passowrd"

Armin

Jan 19 '07 #3
Jak
Oh, I did not find this typing mistake in the code. ^_^ . Thank you very
much.

Best regards,

Jack Zhong
Jan 19 '07 #4

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

Similar topics

1
1225
by: Rick D | last post by:
I'm having problems using breakpoints with Visual Basic .Net. Breakpoints work until I excute certain commands. If I set a breakpoint above the odtrVBDataReader = .ExecuteReader() statement in...
4
4678
by: Beringer | last post by:
Hello, I am trying to make a query against an Access Database File using OleDb part of the framework. I created an SQL Query string using Access and it will execute the query successfully in...
14
2104
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these...
2
1155
by: RAB | last post by:
I tested my code on my local computer and it worked fine. When I uploaded it to my webserver at Godaddy.com, I get the following error... Exception Details: System.Data.OleDb.OleDbException:...
1
4960
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application....
0
1629
by: John G | last post by:
I have been using Oracle Helper to connect to my oracle 9i Db. When excute text it works fine, but when I try to execute a store procedure I get the following error message. I searched...
7
1693
by: Richard S | last post by:
alright, first of all i love thise site, helped me out alot alreaddy, but now i have a problem witch i cant find a answer to after a LONG time of searching. I am trying to make a small search,...
3
5970
by: h4xPace | last post by:
I am building a MySQL query application, and I have run into a small snag. MySQL has released a set of classes that extend the .NET framework base data classes (command, connection, etc), and I am...
1
3050
by: dhyder | last post by:
OK, like the title says my error is Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. I have looked into this a lot, but have not...
0
7225
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
7124
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
7385
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...
1
7046
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
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5053
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
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3195
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
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.