|
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!!
|
|
|
|
|
Thats even the worst side effect.
Imagine a header table with, lets say, 1000 records in it. Each header has 100,000 (badly indexed) child records. Cascade delete is turned on.
Someone comes along and says "Ah header table only has 1000 rows, it will be easy to delete a record from there".
Database reduced to treacle.
|
|
|
|
|
Probably for the same reason as I haven't - we are control freaks who like to explicitly delete things when we want to, not sudenly finding it happening 'on its own'
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hello
SSRS - web service interface generated pdf's with slightly different font/color compared to those pdf when access via "Direct URL access" (point browser to http://localhost/reports/SomeReport/SomeReport - then export by pdf).
Any idea why? Perhaps it has to do with DeviceInfo in Render method? What do I need to do so two are same?
Thanks
dev
|
|
|
|
|
i have a crystal report which is bind with oledb database. tommorrow its working but now it show error that "Table could not found". i googled my problem and can't find any satisfactory solution if anyone knows it solution plz share with me.
advance thnx 4 help
|
|
|
|
|
|
Hi i have 2 tables..,
one is master another one is child...,
ex:
Master=>Pid is primary key
===========
Pid Name
1 m1
2 m2
3 m3
4 m4
5 m5
6 m6
Child=>Cid is primary key
==========
Cid Pid Name
1 2 nm1
2 2 nm2
3 1 nm3
4 5 nm4
5 6 nm5
Now i need the lastest records...,
O/p:
======
Pid Cid Name
6 5 nm5
5 4 nm4
4 null m4
3 null m3
2 2 nm2 //in child table have 2 records for pid...,in tht latest is Cid=2
1 3 nm3
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Try this
declare @tblMaster table(pid int primary key,name varchar(20))
insert into @tblMaster
select 1,'m1' union all select 2,'m2' union all
select 3,'m3' union all select 4,'m4' union all
select 5,'m5' union all select 6,'m6'
declare @tblChild table(cid int primary key,pid int,name varchar(20))
insert into @tblChild
select 1,2,'nm1' union all select 2,2,'nm2' union all
select 3,1,'nm3' union all select 4,5,'nm4' union all
select 5,6,'nm5'
select pid,cid,name from
(
select
m.pid
,c.cid
,case when c.name IS null then m.name
else c.name
end name
,row_number() over(partition by m.pid order by c.name desc) as rn
from @tblChild c
full join @tblMaster m
on c.pid = m.pid
)x(pid,cid,name,rn)
where rn = 1
order by pid desc
Niladri Biswas
|
|
|
|
|
whts tht row_number function?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|