|
In a couple of places I have allowed editing with a Grid, but only out of laziness to allow a knowledgable administrator to configure certain things, never for an average user to muck around with.
|
|
|
|
|
NeverHeardOfMe wrote: And I would say to that: Never say "never"
I have 1 very rigid rule, if you need to edit more than 1 field you will NEVER get a grid approved - go back and do the job properly. If you have only 1 field to edit I want a 3 page justification for not popping a dialog.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Why is there such an objection to (simple) editing within a grid? Suppose you have a CMS used by the client to set up his shop. On one page you allow him to define "sections" - eg, "Toys", "Clothes", "Tools".. whatever. So what would be so wrong in displaying a grid of said sections and allowing him to edit their names there and then, and even add a new section via the footer row? I don't want a dialog for that, and I don't want to load a new page just to do this simple task, nor load the entire "section page" listing its name, sub-sections and/or items within it just to do it either.
The trouble with dialogs in web-apps is that they come at a price - either you need the overhead of fancy javascript to create a modal one that also updates the calling page when closed (and, in the case of adding a new section will maybe need to redirect elsewhere too), or you run the risk of pop-up blockers getting in the way, or it openeing in a new tab and the client wondering what's happened.
I don't see the necessity to take a strict "never edit in a griod" attitude. I quite accept it should be used only in limited cases, but not "never".
|
|
|
|
|
NeverHeardOfMe wrote: The trouble with dialogs in web-apps
I was pretty sure the OP was about a datagridview, and yes web apps have a different set of rules.
My primary problem is that most junior devs want to do everything in a grid, which is fine when there are VERY limited interactions required. As soon as the interaction goes past the trivial they find the limitations of DGV editing.
I am finding with Silverlight I can treat the web much like a winforms app, pop a dialog whenever I need to let the user edit the data.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
NeverHeardOfMe wrote: web-apps
Oh, that's your problem -- they're rubbish.
|
|
|
|
|
I have problem inserting datetime values into my SQL Server 2008 R2.
The server is capable of handling ISO 8601 format, but If I send them as parameters, the SQL Server/OLE DB provicer, seems to be less tolerant on the timestamp string format.
I use OLE DB from C++ and would like to make my insert statement parametrized
INSERT INTO BATCH VALUES (?, ?, ?, ?....
When I specify timestamp values on the ISO8600 format, "2010-10-23T19:41:56.002+02:00", I get errors.
When enter the same timestamp format directly in the statement, I don't get errors
INSERT INTO BATCH VALUES ('2010-10-23T19:41:56.002+02:00', ?, ?, ?....
I have tried two different OLE DB providers. "Microsoft SQL Server Native Client 10.0" and "Microsoft OLE DB Provider for SQL Server"
They both behave slightly differently.
When sending the timestamp values as part of the SQL INSET, both providers accepts the following formats
2010-10-23 19:41:58.000
2010-10-23T19:41:57.001
2010-10-23 19:41:56.002+02:00
2010-10-23T19:41:55.003+02:00
When sending timestamp as parameter:
2010-10-21 13:44:59.092 Is accepted by both
2010-10-21T13:44:57.092 Is rejected by Microsoft SQL Server Native Client 10.0 and accepted by the other
2010-10-23 19:41:56.002+02:00 Rejected by both providers
2010-10-23T19:41:55.003+02:00 Rejected by both providers
The both providers also report different errors
Microsoft OLE DB Provider for SQL Server reports "Conversion failed when converting date and/or time from character string" which I may understand.
The "Microsoft SQL Server Native Client 10.0" reports HRESULT=DB_S_ERRORSOCCURRED.
I would be glad if someone could explain these differences, especially why I can send the timestamp stirng litterally in the sql but not as a parameter.
|
|
|
|
|
Try a parameterized query. I do not know how it works with C++, it should be something like:
OleDbCommand cmd = new OleDbCommand("Insert .....");
cmd.Parameters.AddwithValue("ParameterName1", timeStampValue);
Note: you use here the timestamp value as such, you *must not* convert it to a string!
|
|
|
|
|
I am using Visual Studio 2010 Professional.
I have created a new SQL Server 2008 Database Project, locally applied and deployed a simple scheme and stored procedure. Everything looks as it should until I try to create the unit test by right clicking the stored procedure, is this functionality only supported in Premium and Ultimate?
thanks.
dotman1
|
|
|
|
|
hi all,
i develope a project using c# and sql server 2005, the problem is i want to make a column modifiable in sql server database, and another column to unmodifiable.
how i can set column property to modified or not modified in sql server 2005?.
thanks all
|
|
|
|
|
You are attempting to do this in the wrong place. A database is for storing and manipulating data. The state of the column is a UI issue not a database issue.
Change the properties of your list control to make it read only.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi
i know that, but i the column properties in the database to be unmodified,
in another database the property is exist, but in sql server i can't reach the property.
thanks
|
|
|
|
|
zead wrote: i know that
And yet you insist that SQL server supply this UI functionality!
zead wrote: in another database the property is exist
What is the other database?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi
like pervasive database
|
|
|
|
|
Sorry I had not heard of pervasive. If they supply the functionality you need then use that database, expecting another vendor to match esoteric (and wrong) requirements is not reasonable.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi guys
I detached my database, working for months. after one week I decide to attach it agian. but, I ot the following error:
<br />
<br />
TITLE: Microsoft SQL Server Management Studio<br />
------------------------------<br />
<br />
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)<br />
<br />
For help, click: http:
<br />
------------------------------<br />
ADDITIONAL INFORMATION:<br />
<br />
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)<br />
<br />
------------------------------<br />
<br />
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Hostel.mdf'. (Microsoft SQL Server, Error: 5123)<br />
<br />
For help, click: http:
<br />
------------------------------<br />
BUTTONS:<br />
<br />
OK<br />
------------------------------<br />
<br />
Please help,
I went through many forums on the website but hasn't help me yet.
|
|
|
|
|
I sort out y problem.Righr click and then run as Administrator
|
|
|
|
|
somebody please help me....
i'm using vb.net 2008 and SQL Server 2008...
the case is :
--------------------------------------------------
if i have data in one column like :
ASD654-100-CCCEEE4444-200-
what query can be used to get "CCCEEE4444" ????
|
|
|
|
|
SELECT SUBSTRING('ASD654-100-CCCEEE4444-200-',12,10)
Instead of string value give column name.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
it will not work.
coz i'll never know the starts index and the length of string.
coz the data is randomize.
example :
i want to get "ASD654" and "CCCEEE4444" from the data :
"ASD654-100-CCCEEE4444-200-"
or to get "QWEQWEQ" and "JJJLLL" and "PPPBBMMNN" from :
"QWEQWEQ-2000-JJJLLL-20-PPPBBMMNN-600-"
any idea?
is there any query for looping? 
|
|
|
|
|
Well, you have to use - as split char, by writting your own function then you can get result as you need.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
how to split char "-" in SQL ?
is there a function for looping in SQL ?
teach me please...
i'm begging...
pleaseee..... 
|
|
|
|
|
Use SUBSTRING function
SELECT SUBSTRING([ColumnName],12,10) FROM [Table]
|
|
|
|
|
but i'll never know the starts index and the length of string.
coz the data is randomize.
example :
i want to get "ASD654" and "CCCEEE4444" from the data :
"ASD654-100-CCCEEE4444-200-"
or to get "QWEQWEQ" and "JJJLLL" and "PPPBBMMNN" from :
"QWEQWEQ-2000-JJJLLL-20-PPPBBMMNN-600-"
any idea? 
|
|
|
|
|
For that you should write UDF, depends upon the random data you should define the things & write script for that.
|
|
|
|
|
i agree with blueboy where i have to use "-" as split char.
but the problem is i don't know how to split char using SQL Query.
and i think i need function for looping using SQL Query too.
can u help me pleaseee?
i'm begging.... 
|
|
|
|