I have a question that's more of the hypothetical kind.
I have two tables:
Now I'd like to make one (or zero) email address per user the default address.
On an ANSI compliant system I could simply add a nullable column to the email table and add a check so that the value can only be 'DEFAULT' or null and add a unique composite key on this column and the userid column.
This would of course not work on certain databases that don't allow more than one null value when having a unique key.
So what other solutions are there? Preferrably not allowing null values.
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.
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.
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
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.
Last Visit: 31-Dec-99 19:00 Last Update: 26-Nov-15 0:35