[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

insert to sql database from asax

Posted on 2006-11-12
2
Medium Priority
?
240 Views
Last Modified: 2009-12-16
I want to try to count the number of open sessions on my site. What I hope to do is insert to a sql database from the global.asax file and add 1 to the database field "sessions" on session start in the global.asax and then subtract 1 when the session ends. my problem is that I dont know how to put the "using System.Data.SqlClient;" into the global.asax file so that I can do an insert to the database. I know its pobably a dumb qusetion, but I'm new and trying to learn. Im using VWD 2005 Express with c# code bechind and SQL server 2005 Express on a IIS 6.0 server. Thanks for your help.
 
0
Comment
Question by:cbrick04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 17929415
<%@ Import Namespace="System.Data.SqlClient" %>

Bob
0
 

Author Comment

by:cbrick04
ID: 17935943
Thats exacctly what I needed , Thanks ,
                                                     Bill
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question