|
How does one value becomes equal to another without some update operation?Anyways you seem to know what you want...
|
|
|
|
|
It should works like:
Table structure
id - int
time - datetime
action - varchar
Current operation time: 30-06-2007 11:40:01
insert new row with value
time="30-06-2007 13:33:11"
action="delete"
nothing happen cause now is 30-06-2007 11:40:01
time spend... and is 30-06-2007 13:33:11
Sql server do some action like deleting row and insert or increment data in another one table...
Sorry for my english
Greetings
|
|
|
|
|
I found that in MySQL is something like: create event
Is in MsSQL2005 something simmilar?
Greetings
|
|
|
|
|
You're talking about a trigger, all right.
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 )
|
|
|
|
|
Can you give me a sample how to do this using trigers?
Gretings
|
|
|
|
|
The SQL Server books online have lots of trigger examples, a trigger is code that runs when a table is updated or inserted, in that code, you can examine the values that were changed or added, and modify your actions according to those values.
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 )
|
|
|
|
|
|
I would seem that what you actually want to do is use the database to control a schedule: by setting the start date and time in some field in a table you want to be notified when that entry equals the current system time.
I don't know of any way to do this purely in the database without any external program help. You would need to poll the database and do the comparison yourself programmatically...
|
|
|
|
|
i want to create a trigger.in that trigger when modifying a value from a categorytable i want to check whether any another table in the database containing category id with that value .if it is there i want to display one message.How can i do that?.............
|
|
|
|
|
You can query sysobjects for tables in your database and syscolumns for their respective columns (based on ID).Run these queries on your database
<br />
select * from sysobjects<br />
select * from syscolumns<br />
|
|
|
|
|
YESTERDAY I POSTED SOME QUERIES I NEED THEM NOW BUT THEY HAVE BEEN MOVED
WOTS THE REASON?
I NEEDED ALTERNATIVES FOR THOSE QUERIES
|
|
|
|
|
maybe its your altitude...
|
|
|
|
|
You posted the same question 6 times in a day. They got marked as spam, probably because you kept asking them over and over.
If you follow the forum rules, and abide by simple netiquette, your posts won't be marked down.
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 )
|
|
|
|
|
hello,
iam working on an application which has a database, i wanna deploy my project and create an installer to it but i have a problem with the database, how can i install database with my project,
and if i create a demo version of the project how can i make the application work without installing MS SQL Server, can i do that???
in other words should MS SQL Server 2000 be installed on the machine to make the application running ? or can i embbed my database with the application in some way.
thanks and iam waiting ur replies
its urgent plzzzzzzzzzz
|
|
|
|
|
You can use SQL Server Express, if you want to distribute something that is free. Or move to Access.
Mdallal84 wrote: in other words should MS SQL Server 2000 be installed on the machine to make the application running ?
Yes, and once it's installed, you need to run scripts to create the database on the SQL Server instance, and make sure it's installed correctly in relation to your connection string ( it could be a named instance, for example )
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 )
|
|
|
|
|
Would an application developed in .NET Framework 1.1 and using MSDE be able to work with SQL Server 2005 Express edition which uses .NET 2.0?? Also MSDE is not supported in Vista, does that mean applications using MSDE previously (and .NET 1.1) will not work on Vista?
Also i have restored a DB with some existing users in SQL Express .Now i select Security>Users and try to delete the existing user but it gives me a strange exception like:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Drop failed for User 'test_user'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15138&LinkId=20476
------------------------------
Any idea?
@!$(-)@ $@r£r@Z
|
|
|
|
|
Aisha Ikram wrote: Would an application developed in .NET Framework 1.1 and using MSDE be able to work with SQL Server 2005 Express edition which uses .NET 2.0??
Yes, 2005 uses .Net 2.0 for CLR Stored Procs and stuff like that. What your application uses has nothing to do with it
Aisha Ikram wrote: Also MSDE is not supported in Vista, does that mean applications using MSDE previously (and .NET 1.1) will not work on Vista?
No it means the MSDE won't run under Vista, your application can run on Vista and connect to the MSDE running on a different machine.
|
|
|
|
|
Thanks for the response.
originSH wrote: No it means the MSDE won't run under Vista, your application can run on Vista and connect to the MSDE running on a different machine.
Yes, I understand this but MSDE is meant to be used locally/personally. I don't understand why Vista not supporting this ? is there any way to make that work on Vista?
@!$(-)@ $@r£r@Z
|
|
|
|
|
MSDE is not supported on vista because it is free and Sql Server 2005 Express has taken over from it.
Theres no point putting more effort into MSDE when 2005 Express does everything that MSDE does and more.
Your application should work perfectly well with 2005 Express so you should be able to just do a straight swap.
(Note: well almost the only thing that might break is if you use case insensative passwords. Passwords are now case sensative in 2005)
|
|
|
|
|
thanks a lot for your response.
Any idea about my second question that why i am geeting this message:
Also i have restored a DB with some existing users in SQL Express .Now i select Security>Users and try to delete the existing user but it gives me a strange exception like:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Drop failed for User 'test_user'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15138&LinkId=20476
------------------------------
@!$(-)@ $@r£r@Z
|
|
|
|
|
Hello,
VS 2005
I have a combo box that is bounded to a combo box.
The combo box will load orders into it.
I want to be able to insert "All" into the first element:
Me.cboOrdersCompleted.Items.Insert(0, "All")
However, as the combo box is bound to a binding source it won't all me to insert this word.
The method I have used to fill the combo box is as follows:
Me.cboOrdersCompleted.DataSource = Me.bsOrders<br />
Me.cboOrdersCompleted.DisplayMember = "OrderID"<br />
Me.cboOrdersCompleted.ValueMember = "OrderID"
My problem is when I insert the word it does this without any errors, but doesn't show. If I insert the word after the combo has been filled, then it will give me the error that the "Items cannot be modified once the combo is bound to a datasource"
Is there anything I can do to add this "All" into the combo box?
Many thanks for any suggestions,
Steve
|
|
|
|
|
Manage the bindng yourself. I have never used MS's binding due to its limitations.
|
|
|
|
|
Hi,
I am using an html input box to populate a variable, which is in turn used as a date in a query that interrogates my database.
The problem I am having is that the date needs to be in the format "yyyy/mm/dd hh:mm:ss" for the sql query to work and I cannot find any way of converting the date into this format (I can only seem to convert it to dd/mm/yyyy or mm/dd/yyyy).
can anyone help??
thanks
|
|
|
|
|
Why do you have to have the hours/minutes/seconds for the query to work? Is it used later on?
______________________
stuff + cats = awesome
|
|
|
|
|
You can specify exact formatting for a datetime by using
Dim formattedDate as string = myDate.ToString("yyyy/MM/dd hh:mm:ss")
|
|
|
|