Click here to Skip to main content
       

ASP.NET

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjrahma7 Jul '12 - 5:54 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjrahma7 Jul '12 - 5:59 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjkirkerx7 Jul '12 - 12:30 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjrahma8 Jul '12 - 4:19 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjrahma8 Jul '12 - 4:25 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjrahma8 Jul '12 - 4:41 
GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjkirkerx8 Jul '12 - 10:31 
You don't need to check the value here, since your passing the value to a function, just make sure the value is good before passing it the fucntion, so remove the first line and do it earlier, when your gather data
 
if (Request.ServerVariables["REMOTE_ADDR"] != null) sql_command.Parameters.Add("param_ip_address", MySqlDbType.VarChar).Value = Request.ServerVariables["REMOTE_ADDR"];
else sql_command.Parameters.Add("param_ip_address", MySqlDbType.VarChar).Value = DBNull.Value;
 
I;m not sure what the problem is. I see lot's of tiny errors like the @ in front of the parameter name. @param_id_number
 
INSERT INTO event_log (event_log_category, event_log_user, event_log_ip_address, event_log_machine_name, event_log_os_version, event_log_text) VALUES ('Audit', @param_id_number, @param_ip_address, @param_machine_name, @param_os_version, 'User logged on successfully');
 
Those examples I gave you, you really need to look at the details of them.
 
On the param, you have to declare the variable, then make a new one. If you made the table column a width of let's say 80, use the 80.
 
I did some digging, and I stopped using the Server Request because it was not reliable, and changed to the UserHostAddress, use the context whenever you use request or response as a good habit.
 
Dim ipAddress as String = Nothing
ipAddress = HttpContext.Current.Request.UserHostAddress
 
Dim param_id_number As SqlParameter
param_id_number = New SqlParamter("@ip_Address, SQLDbType.VarChar, 80)
param_id_number.Value = <- Assign a pointer here like ipAddress
sql_command.Parameters.Add(param_ip_address)

GeneralRe: Parameter 'xxxxx' not found in the collectionmemberjkirkerx7 Jul '12 - 8:46 
QuestionCombine the two columns as a single column in excel file and insert into databasememberkumar.ranjith.k30 Jun '12 - 21:20 
Questionasp.net 2010 custom controlmemberclassy_dog30 Jun '12 - 20:02 
AnswerRe: asp.net 2010 custom controlmvpSandeep Mewara30 Jun '12 - 23:30 
Questiondebug aspx pages directlymemberdcof30 Jun '12 - 13:49 
AnswerRe: debug aspx pages directlymvpSandeep Mewara30 Jun '12 - 23:25 
GeneralRe: debug aspx pages directlymemberdcof1 Jul '12 - 5:45 
GeneralRe: debug aspx pages directlymemberDavid Mujica2 Jul '12 - 5:15 
QuestionC# 2010 linkage through master pagesmemberdcof29 Jun '12 - 19:38 
AnswerRe: C# 2010 linkage through master pagesmvpSandeep Mewara30 Jun '12 - 6:45 
GeneralRe: C# 2010 linkage through master pagesmemberdcof30 Jun '12 - 8:23 
GeneralRe: C# 2010 linkage through master pagesmvpSandeep Mewara1 Jul '12 - 1:38 
AnswerRe: C# 2010 linkage through master pagesmemberMickt198530 Jun '12 - 12:48 
QuestionHost server Characteristicsmemberpeace201229 Jun '12 - 9:32 
Generalxsl fo to xslt [modified]memberindian14329 Jun '12 - 8:37 
GeneralTo save file in a stream instead of a physical location [modified]memberindian14329 Jun '12 - 5:58 
QuestionAutomatically Sychronize TFS workitems update with custom toolmemberamit sahu2029 Jun '12 - 1:36 
QuestionCCTV camera on ASP web Pagemembersandeep Nishad29 Jun '12 - 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid