
13-12-2007, 17:38
|
|
|
|
חבר מתאריך: 16.10.03
הודעות: 429
|
|
לא משנה זה היה כנראה בעיות הרשאה בתקייה ספציפית, העברתי את המסד למקום אחר וזה עבד..
יש עוד בעיה הפונקציה הזאת במחשב שלי עובדת, ואם אני טועה בשם משתמש והסיסמא הוא מגיב אבל באניטרנט זה עושה בעיות
הפונקציה:
קוד:
function bd_func(ByVal username As String, ByVal password As String)As Integer
Dim SQL As String = "SELECT user_name,pass FROM users WHERE (user_name = '" & username & "' AND pass= '" & password & "')"
Dim dbCommand As IDbCommand = New OleDbCommand(SQL,dbconn)
dim objreader as oledbdatareader
Dim rowsAffected As Integer = 0
dbconn.Open
objreader=dbCommand.executereader()
if objreader.Read then
rowsAffected=1
else
rowsAffected=0
end if
dbconn.Close
Return rowsAffected
end function
למה באינטרנט זה לא עובד? הבעיה שהוא רושם זה
No value given for one or more required parameters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.
Source Error:
Line 39: Dim rowsAffected As Integer = 0Line 40: dbconn.OpenLine 41: objreader=dbCommand.executereader()Line 42: TryLine 43: if objreader.Read then
|