Any one pls give the definition fo sql stored procedure
or what r stored procedure in sql
what r triggers in sql
difference betn sql triggers and stored procedures
difference betn function in sql and stored procedure
A stored procedure (SP) is just a procedure written in SQL. It takes input parameters and can have a return value, but can also return result sets.
A user defined function (UDF) is also like a procedure but written in SQL, however a UDF is more strict. For instance it can only use deterministic functions. UDFs can be used in other queries in the place of values or tables.
A trigger is a special sort of stored procedure that is run automatically when a specific action occurs, for instance a SELECT, INSERT, UPDATE or DELETE on a table. The trigger can perform additional actions depending on what triggered it.
Colin, I'm glad that you're very helpful but this request sounds suspiciously like someone's homework.
IMHO giving him the short explanation is ok but any more and you might as well be doing his homework for him and that won't really help him further down the track.
Man, I was never this lazy back in my school days.
I've wondered across a peculiar issue with ADO (although something else could be the culprit, but through my investigation, I believe it to be ADO).
I have written a service that uses ADO. When running the service as a console app, everything works great. However, when the service is run 'as a service' in the SCM, I find a problem with the connection.
Basically, this is what I've found to happen:
1. I issue a connect() call, and it returns S_OK.
2. Immediately after that, I execute a simple query, say "select count(*) from table1". At this point, when running as a normal app, the query executes and all is well. However, as a service, the query fails. Upon further inspection, doing a check on whether the connection is actually "connected", I find that it is infact disconnected.
Any ideas? I've been thrashing my brains with this problem for a few hours now. Maybe someone can shed some light on this?
I have tried changing the account under which the service runs. That didn't work. I tried testing different data providers. Same problem. Anything else I can try?
I found the problem. When running under the SCM as a service, the SCM obviously takes the "entry point" nominated in the dispatch table that is passed into StartServiceCtrlDispatcher( ) and puts it into another thread. Since I was calling CoInitialize BEFORE this, COM never got initialized, or so it seemed. Simply putting CoInitialize into the entry point function sorted me out.
As an aside, I am slightly curious why, before the fix, calls the ADO Connection::Open( ) function SUCCEEDED and the CreateInstance( ) function returned what seems to be a valid interface pointer to the Connection object - weird.
I am new to VB6 and i have developed a small application. i have used ado component version 2.5 and when i deploy my application by pdwizard, a messege appears that some ocx components are out of date. and another message appears that dependancy information for msado25.tlb not found. but it builds the setup.
when i install it on target mechine it gives message "Error Registering msado25.tlb" if i ignore it the queries i used in database file does not work and the message appears "Class does not support the automation..."
This is a bug in the P&D Wizard. It finds the msado25.tlb in your project as a dependency and includes it in the build, but the Setup program cannot register type libraries. Also, even if the type library registered correctly, you need other components for ADO to work correctly.
The only way to correctly install ADO services on a target machine is to use the MDAC installation.
To fix all your problems you need to do two things.
1) When you build your package, manually remove the msado25.tlb from this list of included files. This will prevent the user from seeing the "Error registering msado25.tlb" message.
2) Make sure the MDAC is included in the build. This will correctly install all the ADO services.
I am guessing you mean DataAdapter rather than DataSet (as a DataSet does not communicate with the database, while a DataReader does)
A DataReader allows you to get data from the database in a fast forward only fashion. This means that you can start processing the records before all are retrieved from the database. It is useful for situations where you are reading data into your domain objects and don't want/need any extra copies of the data in your system.
A DataAdapter reads all the records into a DataSet first meaning that there can be a slight delay and a larger memory overhead. It is useful for data binding to controls and prototyping.
I was wondering if I could get some advice on this. What Im trying to do is view a stored procedure in an asp page. I dont know much about it and was wondering is it like displaying records in a table? Any help/links would be greatly appreciated. Thanks in advance