Here I have two similar ways of populating a simple Employee class.
I'm trying to work out the pros & cons of each method.
1) Seems simpler but tightly-coupled to the DAL(Data Access Layer)
1)
[code]
class Employee
{
public int ID;
public string Forename;
public string Surname;
public...
I have a collection which I wish to display in a datagrid.
It is a collection of a Name class which has Forename & Surname.
This works fine except I would also like to display the indexer of the collection, to give me a line number, in the datagrid like so:
1 John Smith
2 Bob Jones
Any ideas...
Hi,
I'm fairly new to ASP.NET to hopefully an easy one to solve :)
Whats wrong with this?
Dim Resolved as Boolean = CType(e.Item.Cells(4).Controls(0), Checkbox).Checked
I'm trying to store the value from a datagrid for an update in a datagrid. It works for text but not for a checkbox...
Hi folks,
Bit of a tricky one here, well for me anyway.
As an example I'll use the system tables.
Query 1
-------
select t.xtype, c.name from systypes t LEFT OUTER JOIN syscolumns c ON t.xtype = c.xtype AND c.name = 'info'
ORDER BY t.xtype
This query outputs all the types and the name beside...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp?frame=true
This reduces the complexity of ADO.NET using an Application Block. There is also an application block for easier error handling in the table of contents
i.e.
DataSet ds =...
Anybody know about how I can be notified if the SQL Server services stop.
You can apparently do it in NT Performance Monitor by adding an alert on the process ID of the services and the condition when the value is 0 (stopped). However in W2K the value goes to null rather than 0.
Any workarounds?
Anybody know how I can approximate an input mask from Access in VB.Net?
I wish to enter a date in a text box and have a template
like this:
__/__/_____
where you simply type in the numbers
Is there an easy way to do this?
How can I get the domain group from a login?
i.e.
DOMAIN\Group is a NT Group Login
DOMAIN\User is a member of this group
when DOMAIN\User logs in I want to be able to identify what group they belong to.
Is this possible in SQL?
Using this:
select user_name() as [User], suser_sname() as Login...
Hi,
I have a database which will not be used at night, so should I run any procedures on it.
i.e.
DBCC CHECKDB
DBCC DBREINDEX (ALL TABLES)
Should these be run before or after the backup?
Is it possible to be alerted if there is a problem with these commands, if so how?
I have the following query:
use northwind
select left(shipname, (select max(ProductID) from [order details] where OrderID = O.OrderID)) as test
FROM Orders O
but DO NOT RUN on anything but a test server as it will max out the processing power, and I cant even seem to cancel the query. I have...
ORDER BY requires the EXACT same text in the first select statement as in the ORDER BY clause.
The following query works
use pubs
select state,(case state when 'TX' then 1 else 2 end) from stores
union all
select state,(case state when 'TX' then 1 else 2 end) from publishers
order by (case...
Got a query like the following:
use pubs
select state from publishers
union all
select state from authors
order by (case authors.state when 'UT' then 1 else 2 end),authors.state
Which should order states with 'UT' first. It works fine on just the authors table, but when the union is introduced...
Some good articles about using the COALESCE function.
Dynamic where:
http://www.sqlteam.com/item.asp?ItemID=2077
Dynamic order by:
http://www.sqlteam.com/item.asp?ItemID=2209
Build comma delimited string:
http://www.sqlteam.com/item.asp?ItemID=2368
Hi,
Does anyone know how to use the keys column in sysindexes?
According to BOL it is:
List of the column IDs of the columns that make up the index key.
But I don't know how to make sense of this strange varbinary(816) field.
I would like the column names that the index uses displayed.
Any ideas?
I have a table roughly like this:
ID RecNo
1 1
2 Null
3 Null
4 1
5 Null
6 2
7 Null
8 2
What I would like to do is change the table to:
ID RecNo
1 1
2 1
3 1
4 1
5 Null
6 2
7 2
8 2
i.e. fill in the blanks between similar numbers.
Can I do this with one good sql statement...
Not quite sure whats the most appropriate group to post this question, so I'll try here :-)
I would like to know about anybodys experience of using MSDE and deploying apps with it. I have heard that you can't installed MSDE on a computer with SQL Server, is this correct?
Can you remotely use...
Is it advisable to use just one domain account for multiple sql servers?
For example three developers sharing the same SQLServerAgent account. It will mainly be used to backup local servers to a network drive.
I have an access 2000 database, which I have set a database level password. I now wish to remove it, but when I try to remove the password Access says to open the database in exclusive mode, which I already have!
The default open mode is exclusive as well.
I definitely have the right password as...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.