|
An extra table to store only a reference to the user, and a reference to his default email;
..which would work best if email would get an identity-like field.
--edit;
Add a UNIQUE constraint on the userId-column
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Where's the 'slapping my forehead' icon when I need it? I guess will have to do.
|
|
|
|
|
Hi all,I want to write an application(web or desktop) which will monitor different database status(status:conncetion error,running or down e.t.c) and report back to say:database1 is not down, oracle database2 is down or connection error etc. So I dont really have an idea where to start.Coding using C#.thanx.
|
|
|
|
|
You could begin by something as simple as:
1) Make a connection to the database New SqlConnection(GetConnString())
2) Open the connection SQLconn.Open()
3) Issue some sort of simple command SQLcmd = New SqlCommand("select count(*) from customers", SQLconn)
4) Get data from the DB r = SQLcmd.ExecuteScalar
5) Wrap all of this code in a Try-Catch block and if successful, then you can safely assume that your connection to the database is up and the database is running.
Good luck
|
|
|
|
|
Thanx a lot.I even add more functionalities/Methods
|
|
|
|
|
leketekoa wrote: oracle database2 is
Did you start by looking for existing solutions?
As an example you might want to start with the following in google: nagios oracle
leketekoa wrote: nd report back
What that means can add significantly to scope of the project.
|
|
|
|
|
I have a client that was using Q&A until the old computer died yesterday. He has backups of the data base, but not the program itself and Symantec has not supported Q&A for a long time.
Can anyone point me to a low cost (or free) conversion utility to read these files?
Or a copy of Q&A that I can use long enough to convert them to fixed ascii?
I did find Sesame, which seems to have taken over Q&A, but they want $350 for the program - which is a lot to pay for a few file conversions.
I also found conversion services, but again a lot of money.
Any help appreciated!
|
|
|
|
|
snowman53 wrote: I did find Sesame, which seems to have taken over Q&A, but they want $350 for the program
Also found an online-converting service, but they'll be asking money too. If the data is worth more than those $350, go for it - and explain the concept of backups and/or a vendor lock-in.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
They haven't updated their software since the mid 90's and are upset I can't re-install Q&A without the original copies!
|
|
|
|
|
snowman53 wrote: are upset I can't re-install Q&A without the original copies!
Not very rational, is it? It'd be hard for anyone to install a copy without an installer
Without that copy there's not much you can do, except trying one of the expensive converters. Perhaps your client could take the time and look for a second-hand version?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I know nothing about Q&A but a lot of the 90s databases were based around DBase formats and there was a whole family of drivers for reading various dbase files. The most comprehensive was DBase IV and the foxpro drivers.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the good suggestion - after I read it I tried both formats, but to no avail.
Thanks again.
|
|
|
|
|
I need to secure only one particular database in SQL Server so I could access it only with certain predefined username/password. So, I am login in SQL Server as windows authenticated or sa and see all databases with details, but, for one database I want to see her in list but cannot access further without user/pass.
|
|
|
|
|
sa owns the server so you cannot exclude sa from the database. You then need to delete all other credentials from the database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm experiencing the same problem and I need help.
|
|
|
|
|
You can't "lock" the database with a password. The only way to "protect" your database-model is to keep it on your own server and to provide a web-service to access it.
The owner of the server will be considered the owner of the data, and you can't lock the owner out.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I have 2 columns (Account Number & State) with follwing set of records in my table
Acc No State
1001 WA
1002 NY
1002 NY
1002 NY
1003 CA
1003 CA
1001 CA
1002 NY
I want to pull such Account Numbers that has multiple states associated with that account. Looking at the existing records, output should be as shown below
1001
1002
What query should I write to get this result set?
Regards,
Vipul Mehta
|
|
|
|
|
Got this resolved
Create Table T1 (Col1 int, Col2 varchar(50))
Insert into T1 Select 1001,'WA'
Insert into T1 Select 1001,'CA'
Insert into T1 Select 1002,'WA'
Insert into T1 Select 1001,'WA'
Select Col1 From
(
Select *,ROW_NUMBER()Over(partition by Col1 Order by Col1) RN
From (Select Col1,Col2 From T1
Group by Col1,Col2)T1
)A Where RN>1
Regards,
Vipul Mehta
|
|
|
|
|
Hi,
An alternative way to retrieve the data would be...
SELECT [Acc No] FROM table
GROUP BY State
HAVING COUNT(State) > 1
Thanks,
|
|
|
|
|
That causes error message 8120 in Microsoft SQL server (similar message in MS Access):
Column [Acc No] is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
|
|
|
|
|
Yeah, slight typo there did it on the quick, will have to read it properly next time!
SELECT [Acc No] FROM table
GROUP BY [Acc No], State
HAVING COUNT(State) > 1
Sorry about that
|
|
|
|
|
Create Table T1 (Col1 int, Col2 varchar(50))
Insert into T1 Select 1001,'WA'
Insert into T1 Select 1002,'NY'
Insert into T1 Select 1002,'NY'
Insert into T1 Select 1002,'NY'
Insert into T1 Select 1003,'CA'
Insert into T1 Select 1003,'CA'
Insert into T1 Select 1001,'CA'
Insert into T1 Select 1002,'NY'
select distinct(col1) from t1 group by col1,col2 having count(col1)<2
output will come one record.
because state only one record have multi state
|
|
|
|
|
Jammo gave this exact same answer 2 hours earlier and it was a lot more understandable. Try using the formatting tools for placing code, your answer will be much more readable!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Arun's answer is clearly different from Jammo's. And Jammo's SQL statement fails with an error message.
|
|
|
|
|
My bad - I did not look close enough at the answer.
Never underestimate the power of human stupidity
RAH
|
|
|
|