|
|
replace your command text with the name of the proc only ( EmpDept, from the look of it ) and add your ingoing parameter to the parameters collection.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Thanks for quick response. I will give it a try...but what is wrong with specifying input variable like this. I used to do the same in asp.
|
|
|
|
|
This is not asp, this is a real framework. Your asp code just executed SQL, these classes are taking the proc name and attempting to run a proc named exactly what you typed in, with the parameters you provided. This allows the framework to do things like sanitise the input to protect from injection attacks.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Great!..Thanks for the explaining it in deatil. Now I understand.
Well, I tried the way you have suggested. I still get error .
I have defined parameters like
cmd.CommandText = "Employees.EmpDept"
cmd.CommandType = Data.CommandType.StoredProcedure
cmd.Parameters.Add("userid", OracleType.VarChar)
cmd.Parameters("userID").Direction = Data.ParameterDirection.Input
cmd.Parameters("userID").Value = sUserID
cmd.Parameters.Add("retVal", OracleType.Number)
cmd.Parameters("retVal").Direction = Data.ParameterDirection.ReturnValue
Now I get following error
ORA-06550: line 1, column 17:
PLS-00306: wrong number or types of arguments in call to 'EMPDEPT'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I checked the definition of procedure, its like
CREATE OR REPLACE PACKAGE BODY EMPLOYEE IS
FUNCTION EMPDEPT(sID IN VARCHAR2) RETURN NUMBER IS
vDept NUMBER;
BEGIN
...select statement here ...
END EMPDEPT;
END;
/
Now, what I am missing here?
|
|
|
|
|
peacefulmember wrote: cmd.CommandText = "Employees.EmpDept"
Again, don't scope it, put EmpDept.
It's not a proc, it's a function ? Not sure if the syntax is the same then....
It does look like you're claiming your variable called userID, when it's in fact called sID.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Yes, you answered it right.
I changed the variable from userID to sID, w/o changing the scope or syntax, it worked.
Thanks a lot for your help.
|
|
|
|
|
Hi all,
I have a number of text boxes that the user can fill in. I want to make sure that the user can only use the following characters:
.
+
-
_
(
)
A-Z
a-z
0-9
Unfortunately asp:validators are not working. (And I don't know why, as they used to work before importing the project from vs2003 to vs2005. Plus I don't know how to set this in the validators anyway...)
I'm guessing that regular expressions are the way to go in this case (using Regex.Match(inputString, Pattern), but I don't know how to make a working regular expression. (The patterns I've been trying have ended up crashing when I include a character such a # or ' at the end of the input string.)
So, any suggestions?
- Munty
|
|
|
|
|
Muntyness wrote: Plus I don't know how to set this in the validators anyway...)
How can you know they are not working, if you don't know how to use them ?
A validator validates AFTER text is entered, so you could use a regex validator, but your box will still accept other characters.
www.expresso.com[^], or search this site for Expresso, a tool for building regex. But, if you want to not allow those keypresses at all, you need to write javascript code that does that directly.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Because the validators I do know how to use are no longer working. So far I've tries two different types of validators that used to work under 2003.
This bit I don't know how to do via asp validators is limiting the accepted character sets.
Thanks for the Expresso comment. I'll try that out. (The link you point to leads to a parked domain, but I was able to find it here)
- Munty
|
|
|
|
|
Can u please giv me the code related to validations of a control in ASP.Net 2.0
Priya
|
|
|
|
|
hey baby r u new in .net there are already validators in asp.net dont write any query. go to validation controls or data validator n drag n drop it will work of
byeeeeeeee
lucky
|
|
|
|
|
Man, I have a GOOD question for the brilliant minds out here on CodeProject.
I have been tasked with cleaning up a single ASP.NET web application that has been broken out into 5 different and smaller web apps.
One of the projects, a "Class Library" project if you will, has a set of common DLLs that are used by all 4 of the other new smaller web applications. These "Class Libraries" are frequently updated as they contain the business logic for EACH of the 4 smaller web applications and they contain the data logic for the same.
NOW, for the hard part....
1) I need to keep the DLLs in the "Class Library" in sync ( 1 version shared by all web apps)
2) I CANNOT load them into the GAC (changed too frequently and company policy prohibits hit (NOT MY POLICY ))
3) I am attempting to make this easier to maintain these DLLs instead of having to deploy them to all 4 web apps' bin directories when something in changed.
4) I cannot break up the "Class Library" and move the business/data logic to the application that uses it. As much as that would be the RIGHT thing to do, you know how it is with big companies.
Can ANYONE tell me an intelligent way to accomplish this seemingly impossible task? I am pulling out all of the grey hair that this industry has caused me trying to come up with a viable solution to this problem!!
Thanks in advance!
JamminJimE
Microsoft Certified Application Developer
Why are we still calling it Common Sense when it's just not that common?
|
|
|
|
|
I think I'd add a post build task that copies the dll to all four directories after a build.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Unfortunately, I don't have that luxury either. The code is compiled on my local machine. It is then deployed to the DEV server. I have ZERO control over the DEV server and they will NOT grant any permissions other than for me to copy files out there.
I contemplated a small "FileWatcher" service that, once the files changed in the BIN of the "Class Library" folder, to copy them out to the bins. I can't even put a service on the DEV box!
JamminJimE
Microsoft Certified Application Developer
Why are we still calling it Common Sense when it's just not that common?
|
|
|
|
|
OK, but for testing, you can do that, then it becomes an issue of deployment.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hye problem,
dll is use for reusability of code and program u can execute class library many more times in a different way first of all u have to knowledge abt dll,s read the dll deeply then ask the question to anyone
ok don,t waste ur time with such type of question ok
byeeeee
lucky
|
|
|
|
|
Ummm...what?
If you are trying to suggest that I use class libraries vs. using a dll, that is even more confusing. If that's not what you're suggesting, then I have no clue what you are saying.
I have no input as to the architecture of this application. I have a small opportunity to clean up some poorly written code by reorganizing it the best that we can without a complete re-write. I do NOT have the luxury of taking the application apart and putting it back together correctly. That would literally take months to complete such a task and we have a production deadline approaching long before that project would be completed.
JamminJimE
Microsoft Certified Application Developer
Why are we still calling it Common Sense when it's just not that common?
|
|
|
|
|
Hi all,
Could i change the row of GridView that is used for displaying paging like following :
| <Button> | 1 2 3 4 5 6 7 | 20 |
| ID | NAME |
| 01 | Kate |
| 02 | Jessica |
| 03 | Tom |
| 04 | Han |
It means in paging row, could i add a button or something else?
|
|
|
|
|
no data is shown in datagrid view as u saved so it can done with the help of cr report to make a group of columns ok byeeeee
lucky
|
|
|
|
|
I have 2 questions in regards to the best practices for creating an "Admin" section of a content management system:
1) For security purposes, should the "Administration" section be an entirely separate web project that simply connects to the same sql server database, or is it safe enough to simply create an additional admin folder in my current web project?
2) What's the best practice for storing admin logins in the database? Should they be stored in their own table or should I store them with the rest of the logins in the "aspnet_users" table and just set them up with a different membership role?
Does anyone know of a tutorial that perhaps explains the best practices in regards to this?
Thanks.
-Goalie35
|
|
|
|
|
1 - I don't see any issue with making it part of the same project.
2 - I'd expect to have one set of logins, and a system of storing roles against logins, with admin being one role. I'd probably create a base page class that all admin pages derived from, which checked if the user is an admin, and if not, redirected them from the page.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi.
From Database i m getting data in this format.
CAC PAT A 12/03/07
CAC PAT A 12/04/07
CAC PAT A 12/05/07
CMP CAT B 11/03/07
CMP CAT B 11/06/07
CMP CAT B 11/08/07
CPL AMT C 10/01/07
CPL AMT C 10/04/07
CPL AMT C 10/06/07
I want to display like that
CAC PAT A 12/03/07
12/04/07
12/05/07
CMP CAT B 11/03/07
11/06/07
11/08/07
CPL AMT C 10/01/07
10/04/07
10/06/07
How to do ?
Help me
Thanks
|
|
|
|
|
Gridview is probably the wrong control for this. A repeater is your best bet where you want more fine grained control over what is rendered, the downside being that you lose all the stuff built into the gridview.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi
thanks for reply.
but i m doing modification also.
so want that functionality using gridview only.
plz explain it
thanks
|
|
|
|