Thanks for your reply. its a user control. The use of itis to have one control which could be used on both apps. Is there any solution for that please?
jonhbt
Posts
-
Web User Controls(ascx) -
Web User Controls(ascx)I divided my application into 2 different web apps. I have created a control in the first web app and i need to reference it in the second application. Is it possible to do so? I am trying to drag and drop the control but when debugging i am getting problems. Thanks for your help.
-
SQL SERVER 2008Hi, I have a list of table that I need to make them available for auditing by using that particular procedure. I had in mind to call that procedure in a cursor which identifies the table names, builds the script for that procedure by passing the table name and the source to the procedure and executes it. This procedure will be repeated for all the tables. This will avoid hard coding the procedure for all the tables (which I have over 150). Yes yu're right they should be as listed below;
DECLARE Alter_tables_cursor CURSOR FAST_FORWARD
FOR
select table_name from information_schema.tables where table_name<>'dtProperties' and table_type<>'VIEW'
OPEN Alter_tables_cursor
DECLARE @tablename sysname
FETCH NEXT FROM Alter_tables_cursor INTO @tablename
WHILE ( @@FETCH_STATUS = 0 )
BEGINEXECUTE 'sys.sp\_cdc\_enable\_table @source\_schema = N''dbo'', @source\_name = N''TBL\_ACTIVITY\_ACT'', @role\_name = NULL' FETCH NEXT FROM Alter\_tables\_cursor INTO @tablename END
DEALLOCATE Alter_tables_cursor
Thanks for your reply.
-
SQL SERVER 2008Hi, I need to use the
sys.sp_cdc_enable_table procedure
with the
@schema, @source_name, @source_name
parameters in a
cursor
but I can't find an example to follow. Can someone guide me with this with an example please? Thanks for your help. Regards
-
SQL SERVER 2008I am running a stored procedure through a website and is working fine. When I right click on it an select execute to execute it the stored procedure starts executing and after a while the SSMS returns an error message Error message is: Exception of type 'System.OutOfMemoryException' was thrown. What can be the cause of this error message thrown? Thanks
-
Controlling LEDs From USB portI need to control a set of LEDs from a usb port. Can someone help or relate me to an article on how to do that please? I think I will try to use C# coding to access the usb port. Thanks
-
Parameters problemIt didn't work either it is showwing me the following error.
{System.Data.OleDb.OleDbException: Data type mismatch in criteria expression
-
Parameters problemI am running the following MS ACCESS select command from a c# method.
SELECT USERINFO.USERID, CHECKINOUT.CHECKTIME, CHECKINOUT.CHECKTYPE, DEPARTMENTS.DEPTNAME, USERINFO.NAME FROM (CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID = USERINFO.USERID) INNER JOIN DEPARTMENTS ON USERINFO.DEFAULTDEPTID = DEPARTMENTS.DEPTID WHERE CHECkINOUT.CHECKTIME BETWEEN @fromDate and @toDate " + sensors + "ORDER BY DEPARTMENTS.DEPTNAME;"
The problem is that the parameters that I am passing, which are in date format are throwing an ivalid criteria exception. This is how I am passing the parameters
cmd.Parameters.AddWithValue("fromDate", todayDate);
cmd.Parameters.AddWithValue("toDate", tomorrowDate);Can one identify why it is telling me ivalid criteria when the values should be dates?
-
DataTable.Select() PRoblemI think that solved the problem. I stil have to takle the performance issue, but THANKS alot for your help
-
DataTable.Select() PRoblemThis is my declaration of te DataTable
DataColumn Column1 = new DataColumn("Name");
DataColumn Column2 = new DataColumn("Department");
DataColumn Column3 = new DataColumn("Date");
DataColumn Column4 = new DataColumn("UserID");
DataColumn Column5 = new DataColumn("CheckType");dtCSV.Columns.Add(Column1); dtCSV.Columns.Add(Column2); dtCSV.Columns.Add(Column3); dtCSV.Columns.Add(Column4); dtCSV.Columns.Add(Column5);
Ill try what you suggested
-
DataTable.Select() PRoblemno im not useing multi threading. The value is the same only for the set of values chosen. WHen i change the set of values by a filter from the select command in the database, the value is different.
-
DataTable.Select() PRoblemthanks for the advices. Regarding to the problem the values are Numbers in the database. There wasn't only one value since i tried different values. One of them was 279 which was giving problems. the strange thing is that this process runs for most of the values but at a certain point in time it stops. that is why i am confused, since all the values that are being passed are numbers.
-
DataTable.Select() PRoblemI have a try catch but, only error prompting is System.argument Exception{"Min (14) must be less than or equal to max (-1) in a Range object."}
-
DataTable.Select() PRoblemI am writing the console calls so that to know what is the last value that the program is having. It is crashing in this part. The values when the program throws the exception differ.
string strExpr = "UserID = " + dataRow["USERID"].ToString(); Console.WriteLine("Expression " + strExpr); DataRow[] filteredRows = dtCSV.Select(strExpr);
-
DataTable.Select() PRoblemSry for that I didn't want to cause any problems the code that I am using is this
DataTable dtAllEmps = new DataTable(); dtAllEmps = cetData.GetALLEmployessByDate(conString, sensors); foreach (DataRow dataRow in dtAllEmps.Rows) { if(dtCSV.Rows.Count == 0) { DataRow newRow = dtCSV.NewRow(); newRow["UserID"] = dataRow["USERID"]; newRow["Department"] = dataRow["DEPTNAME"]; newRow["Date"] = dataRow["CHECKTIME"]; newRow["Name"] = dataRow["NAME"]; newRow["CheckType"] = dataRow["CHECKTYPE"]; dtCSV.Rows.Add(newRow); } else { Console.WriteLine("User ID " + dataRow["USERID"].ToString()); if (dataRow["USERID"].ToString() != "") { string strExpr = "UserID = " + dataRow["USERID"].ToString(); Console.WriteLine("Expression " + strExpr); DataRow[] filteredRows = dtCSV.Select(strExpr); if (filteredRows.Count() == 1) { Console.WriteLine("Number of Rows " + filteredRows.Count().ToString()); DataRow csvRow = filteredRows[0]; DateTime csvDate = Convert.ToDateTime(csvRow["Date"]); DateTime tableDate = Convert.ToDateTime(dataRow["CHECKTIME"]); Console.WriteLine("csvDate" + csvRow["Date"].ToString()); Console.WriteLine("tableDate" + dataRow["CHECKTIME"].ToString()); if (csvDate < tableDate) { filteredRows[0]["Date"] = tableDate.ToString(); filteredRows[0]["CheckType"] = dataRow["CHECKTYPE"].ToString(); filteredRows[0]["Department"] = dataRow["DEPTNAME"].ToString(); }
-
DataTable.Select() PRoblemI created a method that makes use of the .Select() method so that to check in a datatable if the value is already in the data table. For 1/4 of the recordss its working but at certain point it prompts out the fllowing error Min (14) must be less than or equal to max (-1) in a Range object. I am getting the data from MS Access. I have changed the databases so that to check if it was only with one version but It still showed me the error. only the number 14 changed. I have checked the records of the ids that the program was stopping all and they are all good values. Can some one help on that please. it is very urgent. THAnks alot for your time and help.
-
AUTO NUmber column in SQL serverHi I have created tables with their primary keys as integers. How can I write a statement to Alter the primary key and set the identity (autonumber) on it in SQL Server? Thanks
-
MS ACCESS QUerycan you relate me to an example please of how this is done. Thanks
-
MS ACCESS QUeryNothing happened U tried it that way before and still the same error. The error is in second select statement because when i removed that part it worked. So if there is a way I can replace that sql part it would solve it. The funny thing is that when running that in the access queries it works
-
MS ACCESS QUeryi tried but the same syntax error