|
I dont want to change any format anywhere. Its the access which is changing the format from dd/mm/yyyy to mm/dd/yyyy. Why it is doing and wats the solution?? Thats my question.
|
|
|
|
|
sachees123 wrote: Its the access which is changing the format from dd/mm/yyyy to mm/dd/yyyy.
Databases don't store dates in a specific format, they store them as numbers[^]. The database applies one of the predefined dateformats when you retrieve the value. You can change[^] the table-design to change the default format that's used for the date-column though.
I are Troll
|
|
|
|
|
Key announcements were made at PASS Summit 2009 about SQL Server:
Upcoming SQL Server 2008 R2 community technology preview (CTP) would be available in November.
SQL Azure is now feature-complete and goes live in January.
Two new editions of SQL Server to address high-end, mission-critical scenarios:
Microsoft SQL Server 2008 R2 Datacenter
Microsoft SQL Server 2008 R2 Parallel Data Warehouse (formerly project code-named “Madison”)
For more information, see Two New Editions Join SQL Server 2008 R2 Roadmap[^]
|
|
|
|
|
Hi,
I have one SQL query, i want to update it in one database. Please check that SQL query below.
update employee set emp_name = 'Ravi' where emp_id = 1
Now i want to get the count of how many rows get updated..
Can any one help me out as it urgent requirement for me..
Thanks
John.
|
|
|
|
|
ExecuteNonQuery would do that if you are speaking of managed C++.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
|
I always use stored procs but this may work.
update employee set emp_name = 'Ravi' where emp_id = 1; Select @@Rowcount Updated
Not sure if it requires a colon or a semi colon.
|
|
|
|
|
Hello Holmes,
Yes, you have given exact query.. i have executed this query in QueryAnalyser it is working fine and this what i am expecting..
Can you please explain me how to execute this query through VC++..?
Thanks
John.
|
|
|
|
|
Sorry, I wouldn't know VC++ if it wandered up and bit me, I suggest you take it to the language forum.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi!
I have recently published a website to a Windows 2008 x64 Server with SQL 2005 Express Edition. I am able to logon to the website but when I navigate to view employees for instance then I get the error 26 message.
I enabled the TCP/IP and Named Pipes Protocols, added SQL browser.exe to the firewall including port 1433 and 1434. I also checked to make sure SQL Browser is running.
Does anyone have any suggestions?
Illegal Operation
|
|
|
|
|
|
|
Hi Friends,
i am trying to refresh a data base where i need to authenticate the user first with something similar window as we see in SQL client.
can somebody help me here..
Thank you very much!
vikas da
|
|
|
|
|
So you are after a logon screen, try searching CP or Google, there are hundreds of examples. You should probably be asking this in the forum of your language choice (C#, VB, C++ etc).
|
|
|
|
|
|
Respected,
How can we truncate the whole tables value from my DataBase by single query.
Thanks
|
|
|
|
|
truncate table tblName
Niladri Biswas
|
|
|
|
|
Drop database: The DROP DATABASE statement is used to delete a database. Everything is deleted ... tables, views, indexes, stored procedures, etc
Drop Table: The DROP TABLE statement is used to delete a table.
Truncate Table: Delete the data inside the table, and not the table itself
Use this as reference:
http://www.w3schools.com/SQl/sql_drop.asp[^]
|
|
|
|
|
Respected,
But I have given the Relations to Tables.
Thanks.
|
|
|
|
|
Then do it one table at at time, starting from the leaf tables...
eg:
Persons have one or more Addresses. Delete Addresses first, then Persons.
|
|
|
|
|
You could have specified that in the post.. How can one come to know that you want to perform a CASCADE DELETION ?
e.g.
CREATE TABLE tblPK
( id int primary key )
CREATE TABLE tblFK
(id int,
name varchar(50),
age int
FOREIGN KEY (id) REFERENCES tblPK ON DELETE CASCADE)
Niladri Biswas
modified on Wednesday, November 4, 2009 12:51 AM
|
|
|
|
|
In 20+ years of database design and development I've never actually used cascade delete, I wonder why!
|
|
|
|
|
Mycroft Holmes wrote: I wonder why!
Because you are scared of it?
|
|
|
|
|
I always envisage someone going to the settings table and using cascade delete on the Standard Customer record or something. Scared does not even cover it, terrified is closer.
|
|
|
|
|
Meh... don't let users have access to the tables... have a good backup strategy!!
|
|
|
|