473,660 Members | 2,475 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.IDbConnect ion

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.OleDbComm and()
Dim rs As Int16

cmd.Connection = clsDatabase.cnD atabase
cmd.CommandType = CommandType.Tex t
cmd.CommandText = "Select count(*) from TLOGIN Where LoginID='" +
User + "' AND Passowrd='" + Password + "';"
' cmd.CommandTime out = 30

rs = CInt(cmd.Execut eScalar().ToStr ing)
MsgBox(rs.ToStr ing)

End Function

Best regards,

Jack Zhong
Jan 19 '07 #1
3 897
"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*******@free net.deschreef in bericht
news:e3******** ********@TK2MSF TNGP03.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
1241
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 the example below it works fine. Any breakpoint after the statement won't be hit. The code executes as expected, it just won't stop at the breakpoints. Also if I single-step to the command above, when it is executed I get the "There is no source...
4
4683
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 example SQL statement below: SELECT * FROM myTable WHERE column1 Like "mytext*"; Now when I take that command and place it in an OleDbCommand as follows:
14
2117
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 grid and write to the database and I set the new Primary Keys and related Fields to the new asigned atuonumbers in the Access.
2
1159
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: Operation must use an updateable query. The line of code with the error is: objCmd.ExecuteNonQuery
1
4965
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application. -------------------------------------------------------------------------------- 無值提供給一或多個必要參數。 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
0
1637
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 everyplace for a solution. System.Data.OleDb.OleDbException: ̸Ώ System.Data.OleDb.OleDbCommand.ExecuteCommandTextForMultpleResults(tagDBPARAMS dbParams, Object& executeResult) +161
7
1720
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, witch will search true my database table called "serials" in the colum "SoftwareName" for a match. but im having the biggest trouble in making it work. this is my code atm: protected void btn_search_Click(object sender, EventArgs e) { ...
3
5981
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 using them to interact with the MySQL server (on localhost). Everything works great on that side of the aisle. However, I have never worked with getting schema from a database before, so I am fumbling around for a workable solution to doing...
1
3058
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 been able to find a solution to it. <%@ Page Language="c#" runat="server" debug="true" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %> <script runat="server"> OleDbConnection conn = new...
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8539
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7360
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2759
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 we have to send another system
2
1739
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.