|
Sure I heard of stored procedures, I use them when I find necessary.
"Response.Write("dr" + dr[0] + " ");" is for testing purposes. A lot of programmers do it when testing the results of the query.
All the items are templated actually.
You are right i mixed it with itemCreated.
Thanks for the help.
|
|
|
|
|
Albert83 wrote: A lot of programmers do it when testing the results of the query.
A lot of novice programmers. Professionals use a debugger.
only two letters away from being an asset
|
|
|
|
|
has nothing to do with level. It's a matter of preference.
|
|
|
|
|
Mark Nischalke wrote: A better solution to in-line SQL? Ever heard of stored procedures?
It's a myth. IMO, nothing wrong with inline SQL other than the difficulty of recompiling code when the DB structure changes. This can be avoided by abstracting the table structure using views. So still you can write inline SQLs safely. Please do correct me if you felt I am wrong.
|
|
|
|
|
N a v a n e e t h wrote: Please do correct me if you felt I am wrong.
Where do I start? This argument has been raised several times.
Inline doesn't allow for separation of the business logic from the presentations, which a good design does, and increases maintenance and development. 10 apps with the same SQL statement must each be changed, rather changing one stored proc. Worse yet, if the schema changes, say a table or column is renamed, all statements must be changed instead of changing one stored proc. Inline statements also don't allow the RDBMS to optimize the execution or otherwise cache it for better performance. Just few of the many reasons.
Then again, if you don't care about robust, well designed and performant applications, keep using inline statements.
only two letters away from being an asset
|
|
|
|
|
That is true. But if you use a statement only once it's ok to use inline statement.
|
|
|
|
|
And if that one statement is executed 1000 times, what does that do for the performance of your system?
only two letters away from being an asset
|
|
|
|
|
I actually meant execution because that's what matters. Used means executed.
Any time the statement executed more than in one place it's easier to work with stored procedure, and modify it.
|
|
|
|
|
and I have a serious problem in my website...
I'm handling a login project, where let the user to login in pageA before entering pageB or pageC. When running at localhost, everything was fine.
Now the problem is when i put into the webserver. The session timeout within 30sec or less eventhough i had code :-
set Session(Login) = user in pageA
-
Session.Timeout = 60 (in pageB & pageC during
pageload!)
If Session(Login) = Nothing Then
respone.redirect(PageA) Else ...............
Although I set the session timeout in web.config as well,
it didn't work
in web.config:
I set the session state to be inProc (didn't work)
also i did:
<sessionState
mode="StateServer"
stateConnectionString="tcpip=65.182.97.156:42424"
cookieless="false"
timeout="20" />
and it didn't work...
many Thanks!
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
Try it
<authentication mode="Forms">
<forms slidingExpiration="true" timeout="60"
loginUrl="~/LogIn.aspx"
defaultUrl="~/Default.aspx"/>
</authentication>
Prabhakar.
|
|
|
|
|
Hi
I have a desktop application written using VC++.NET. Majority of the code in it is written for manipulating a MySQL database.
I am planning to migrate the desktop application to a Web application. So will I be able to use the existing VC++.NET code for it?
If not, how can I convert it to C#? Is there any good free tools for conversion?
rgds
Anvesh
|
|
|
|
|
anveshvm wrote: So will I be able to use the existing VC++.NET code for it?
You can use it. Just create managed wrappers for your VC++ classes and use the wrapper classes with your web applications. If you are writting your wrapper in C#, you need to use P-Invoke for accessing C++ classes. If you use C++/CLI, you can use it directly by including necessary files into your managed class.
|
|
|
|
|
"If you use C++/CLI, you can use it directly by including necessary files into your managed class."
If I wrap with C++/CLI can I call the functions from asp.net ??
|
|
|
|
|
anveshvm wrote: If I wrap with C++/CLI can I call the functions from asp.net ??
Yes. But you will have problems if the VC++ classes are handling with MFC forms or other things which web application won't support.
|
|
|
|
|
Recurments :
Perform multiple chat in multiple windows.
plz help me.
|
|
|
|
|
Since this is only your second post to CP, I'd suggest to read the forum guidelines and this[^]. Now go and rephrase your question.
|
|
|
|
|
Hey Navaneeth, Congrats for became a Fixture !!! Good Job !!!
cheers,
Abhijit
|
|
|
|
|
I din't get what you meant. What happened?
|
|
|
|
|
I just want to say you congratulation for becoming a Fixture in CodeProject.
cheers,
Abhijit
|
|
|
|
|
N a v a n e e t h wrote: I din't get what you meant. What happened?
He means that if you look at your profile[^] then you'll see you've been graded a "Fixture" becuase of the number of posts you've made.
|
|
|
|
|
Ohh thanks. I haven't noticed that.
|
|
|
|
|
Hi There,
I have a problem regarding div tag.I had created a box using div tag using javascript for showing error messages.It works properly but what I want to do is that I want to change Corners of Box.I want to make it round corner Box.Is there any property of div tag to set corners.I am using Asp.Net 2.0 and C#.net;
Thanks.
|
|
|
|
|
ArifShaikh wrote: I want to change Corners of Box.I want to make it round corner Box.Is there any property of div tag to set corners
There are a set of specific Mozilla extensions that allow this, but it obviously won't work on all browsers.
Your best bet is to create some graphics to draw the box they way you want it.
|
|
|
|
|
I have found this site http://www.spiffycorners.com/[^] very useful for creating rounded corners on div tags. It is a cross browser solution using CSS which is generated for you when you supply background and foreground colours.
;-]
|
|
|
|
|
I am creating ASP.NET pages that need to read log information from the IIS log file. I want to count IP numbers in the log to get some visitor statistics.
The problem is that the web site is hosted in a server that is shared with other companies and web sites. I have FTP access to the folder that contains log files to my account, but I don't know how to get access to that folder from ASP.NET code.
Using Server.MapPath seems not to work because the log files is at same level at the "wwwroot" folder. They are stored like this:
/logs
/wwwroot
This is how it is seen via a FTP client. "wwwroot" contains all web pages. "logs" contain the log files.
I have also tried hard code some folder paths (checking with DirectoryExists), but without success.
Is there any general way to obtain the folder path to the IIS log folder? Any class or function that can return the path? Or is there any general way to read information in IIS log files?
I can not just figure out how to read the log files in that folder...
|
|
|
|