This line ((DataView)currencyManager.List).AllowNew = true; generate an error: invalid cast ! 10x in advance --- object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-) -- modified at 15:06 Thursday 8th September, 2005
airbus380
Posts
-
Winforms Datagrid New Row -
Winforms Datagrid New RowYes, indirectly. My collection is derived from CollectionTemplate (I use ORM.NET from Olero) base class collection witch implement IBindingList (is true). I just want that DataGrid to do not display new row. object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
Winforms Datagrid New RowHy, 10x for response, but I have a collection bounded to Datagrid control not a DataSet/DataTable object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
DataGrid new rowI have an typed collection wich is bounded to datagrid control like this: dataGrid1.DataSource = collection; How to disable 'new row' in DataGrid ? object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
Winforms Datagrid New RowI have an typed collection wich is bounded to datagrid control like this: dataGrid1.DataSource = collection; How to disable 'new row' in DataGrid ? --- object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
Data Isolation and Transaction Isolation- ok 2) Try use SQL Server SET command like this:
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
for example --- object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
- ok 2) Try use SQL Server SET command like this:
-
Data Isolation and Transaction IsolationWhat DBMS you have ? Level of isolation may differ from theory to a specific DBMS or from a DBMS to another DBMS ! --- object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
Help Me on this query!First) If in Tools menu > Options > Tables/Queries > Is not checked "SQL Server (ANSI 92) Compatible syntax - This database" (which is IMPLICIT option in Access) then NVARCHAR is not recognise by Access. Instead you must use Text data type. Solution: query must be rewrite thus:
CREATE TABLE [1384/6] ( OrderTable int NOT NULL , OrderNo int NOT NULL, OrderTypeIDn text(20) NOT NULL, Report text(254) NOT NULL, Receptionist text(50) NOT NULL , Cashier text(254) NOT NULL, Day text(15) NOT NULL, TimeInstant text(15) NOT NULL, Description text(254) )
Second) If in Tools menu > Options > Tables/Queries > Is checked "SQL Server (ANSI 92) Compatible syntax - This database" then NVARCHAR is now recognise by Access but the problem is "Day" field name wich is reserved word because is the name of DAY function from SQL Server - DAY(date) return a integer representing number of day (between 1 and 31) Solution:CREATE TABLE [1384/6] ( OrderTable int NOT NULL , OrderNo int NOT NULL, OrderTypeIDn nvarchar(20) NOT NULL, Report nvarchar(254) NOT NULL, Receptionist nvarchar(50) NOT NULL , Cashier nvarchar(254) NOT NULL, DayField nvarchar(15) NOT NULL, TimeInstant nvarchar(15) NOT NULL, Description nvarchar(254) )
Ok ? --- object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-) -
group by and concat dependent rowsTry this: First) You must create a "user defined function" (T SQL function) like this CREATE FUNCTION SSum (@a INT) //SSum = string sum RETURNS NVARCHAR(255) AS BEGIN DECLARE @ssum NVARCHAR(255) DECLARE @b NVARCHAR(25) SET @ssum = '' DECLARE crs CURSOR FOR SELECT B FROM table WHERE A = @a OPEN crs FETCH NEXT FROM crs INTO @b WHILE( @@FETCH_STATUS = 0 ) BEGIN SET @ssum = @ssum + '-' + @b FETCH NEXT FROM crs INTO @b END CLOSE crs DEALLOCATE crs IF( LEN(@ssum) != 0 ) SET @ssum = SUBSTRING(@ssum,2,255) RETURN @ssum END Second) Build a SELECT query using SSum function like this: SELECT DISTINCT A , dbo.SSum(A) AS Result FROM table --- object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
MDF filesJust install a copy of SQL Server or MSDE and attach database files with sp_attach_db system stored procedure. If you use MSDE and you don't have Enterpreise Manager you may use osql or isql commnad prompt tool. object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitare oriented :-)
-
OODBMSWhat you like/dislike at OODBMS ? What you want from a OODBMS ? object oriented uml oriented iconix oriented sql oriented truespace oriented --- solitaire oriented :-)
-
i ned help soon pleaseSQLDMO is the easy way. Also you can use system tables and system stored procedures: sysobjects, etc.
-
concatenate recordset into one rowI want to say that you must create a "user defined function" (T SQL function) like this
CREATE FUNCTION SSum (@id INT) //SSum = string sum RETURNS NVARCHAR(255) AS BEGIN DECLARE @ssum NVARCHAR(255) DECLARE @dayofweek NVARCHAR(25) SET @ssum = '' DECLARE crs CURSOR FOR SELECT DAYOFWEEK FROM schedule WHERE ID = @id OPEN crs FETCH NEXT FROM crs INTO @dayofweek WHILE( @@FETCH_STATUS = 0 ) BEGIN SET @ssum = @ssum + ',' + @dayofweek FETCH NEXT FROM crs INTO @dayofweek END CLOSE crs DEALLOCATE crs IF( LEN(@ssum) != 0 ) SET @ssum = SUBSTRING(@ssum,2,255) RETURN @ssum END
After, built your report on a SELECT query using SSum function like this:SELECT DISTINCT ID , dbo.SSum(id) AS Days FROM schedule
VB6,C# -- modified at 17:46 Wednesday 31st August, 2005 -
pleaseCheck if your database management system suport GRANT / REVOKE SQL commands !
-
Help Me on this query!Access doesn't recognise nvarchar data type. You must replace nvachar data type with text !
-
Un limited data Store in fieldWhy ? What is the goal ?
-
How do I query dates stored in a varchar field?What is datetime format setting for your server ? Use DBCC USEROPTIONS in SQL Analyzer ! VB6,C#
-
How do I query dates stored in a varchar field?See SQL Server Books Online topic: CAST and CONVERT
-
How do I query dates stored in a varchar field?If all the values from field4 are in Y-M-D HH:MM format then SQL Server will implicit conversion VARCHAR field to DATETIME.
-
How do I query dates stored in a varchar field?SQL Server will return those records for which CAST(field14 AS Datetime) is greather than '2005-09-01' only if value for filed7 is equal with 'Work Order' Your result may be empty if settings for database COLLATION or field7 COLLATION is case sensitive CS. Try to use this condition: ... AND UPPER(field7) = 'WORK ORDER' Be attention at spaces between WORK and ORDER ! Also, the condition for date may be rewrite thus: MONTH( field4 ) >= 9 AND YEAR( field4 ) >= 2005