473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

programmatic database access


This is a long post. If you have answers I'm ready. If you have web
links, that'd be great too. I'm a Junior/Senior in Computer Science at
Washington State University, so you can make some assumptions about
terminology I'll be familiar with based on that.

I am trying to write a class that will abstract out database access
stuff for my application. This class will be called DBUtil
I will use this class to do the gruntwork for a custom membership
provider. I will call this class CustMemProvider .
I need help with two things. First I need help with the web.config
file. Second I need help with the programmatic access of the database.
***First, the web.config stuff: My problem with the web.config file is
that I don't understand most of the naming stuff that goes on in it.
Specifically with the ' name="<what??>" ' tag. I need to know what to
name the database. Also I need to know what to name the membership
provider when it appears in the web.config membership provider tag. I
need to know what the ConnectionStrin g should say as well. (I've seen
the fields for these tags, but never seen a good explanation of them.)

***Now on to the custom class stuff: In my DBUtil class I will have a
static string to hold the connectionStrin g for the connection setup. I
will hard-code the query string into each individual function. These
functions will return DataSets (to make it easier to pass the DataSet
reference out to the page) or booleans.

I prefer to use email to uniquely identify users, so I'll write my own
custom validation code as well. I need help figuring out what to do
with that. I'm assuming it's a predefined interface from the required
base class, but I need to change the fields around to pass in an email
instead of the default username, and then, of course, the password.
Also, I need to see code for the setup of a connection and the running
of a query from my module.

Is there a way to make a script or something that sets up my database
and tables when it's run? I'm thinking about future installation needs.
***As an afterthought... what the heck are stored procedures and how do
I make one?

Thank you for your help.
--
williamphenryjr

--
William
www.williamphenryjr.com
--
"Obstacles are those frightful things you see when you take your eyes
off your goal."-Henry Ford
------------------------------------------------------------------------
williamphenryjr 's Profile: http://www.hightechtalks.com/m268
View this thread: http://www.hightechtalks.com/t361805

Apr 9 '06 #1
2 1758
William,

There's a custom membership provider example on MSDN that might help:
http://msdn2.microsoft.com/en-us/library/44w5aswa.aspx

It includes an example web.config that's configured to use the
provider, hopefully it demonstrates some of the different membership
configuration elements.

Stored Procedures:

A stored procedure is just a program stored within a database. It's
usually, but not always, a sequence of SQL queries, although SQL Server
2005 now supports stored procedures written in any .NET language, such
as C# or VB 2005.

SPs are usually faster than regular queries because they can be
compiled and have more direct access to your database objects. They
can be useful for encapsulating data access logic inside the database.
It's also more secure to us SPs because you are better protected from
SQL injection attacks.

SQL Data Definition Language (DDL) scripts:

It's possible to write DDL scripts in SQL that create database objects.
For example:
- CREATE TABLE
- ALTER TABLE
- CREATE INDEX
- etc.

Connection Strings:

For loads of great examples of connection strings, check out:
http://www.connectionstrings.com/

HTH,

Chris

Apr 9 '06 #2

Thanks Chris! Very helpful! You've definitely pointed me in the right
direction!
--
williamphenryjr

--
William
www.williamphenryjr.com
--
"Obstacles are those frightful things you see when you take your eyes
off your goal."-Henry Ford
------------------------------------------------------------------------
williamphenryjr 's Profile: http://www.hightechtalks.com/m268
View this thread: http://www.hightechtalks.com/t361805

Apr 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2439
by: Dave Boyd | last post by:
Are there arguments for the built-in commands called via RunCommand such as acCmdNewObjectReport or do they always require interactive input? Is the code behind the built-in commands exposed anywhere? At one time there was some code available for wizards, is this all hidden now? Thanks!
19
2101
by: Bill Cohagan | last post by:
I'm constructing an ASP page that I'd like to test by writing a program that simulates "many" users hitting the submit button on a form. I assume it's possible to manually construct an httprequest object, but the docs are more oriented towards using one that already exists. Am I on the right track or is there an easier way? In my case the...
3
5257
by: MikeM | last post by:
I've been trying to locate some property or method that will allow programmatic access to the "loginUrl" attribute in the web.config file in the <system.web> -> <authentication> element when the config file is set up for Forms Authentication. I know certain system.web settings get mapped to various properties/methods during runtime (e.g....
6
1177
by: daver | last post by:
Hello all, I am running IIS 5.1 on Windows XP professional. I am writing a web application in C# with Visual Studio.NET. I would like to populate various data structures in my web application from an Access database on the local hard drive. However, the instant my code touches the Access database, it triggers the asp process thread to...
2
1344
by: Daniel | last post by:
programmatic to ftp virtual directories when i connect to an ftp server and i only have access to a few of the ftp virtual directories, do i just change directory to them after connecting and having credentials authorized? is there some special protocol for changing directories to authorized virtiual directories?
6
4159
by: Blaine Manyluk | last post by:
I have a very unusual request. I need to be able to generate reports and save them as TIF files, with full programmatic control. The application will provide the filenames. Each page of the report will be saved as a seperate file. All the user should have to do is press a button to generate the TIFs, without having to "touch the meat" of...
1
1645
by: shumaker | last post by:
I just need to know gnerally what commands/api I would need to look up documentation for, if this can be done at all. I have some users who take copies of an Access database home with them to do analysis. I am going to split the database however, and that means that they will have to copy the backend and then relink to that local copy in...
1
1585
by: Demetri | last post by:
So far all the examples I've seen on the GridView gets its data declaratively using one of the Data Source controls such as the ObjectDataSource. Are there any good articles on using the GridView programmatically, getting data from a business tier, and implementing sorting and paging on that data. All of that without one of the Data Source...
9
2934
by: Axxe | last post by:
I have searched high and low for cogent, well-explained coding to complete a project on which I have spent six months of work. I stumbled across something on this site that is close to what I seek, but, as is rather typical, I could understand neither the question nor the answer. I am hopeful that someone in this forum can provide me...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.