Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jonhbt

@jonhbt
About
Posts
105
Topics
57
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Web User Controls(ascx)
    J jonhbt

    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?

    ASP.NET winforms help question

  • Web User Controls(ascx)
    J jonhbt

    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.

    ASP.NET winforms help question

  • SQL SERVER 2008
    J jonhbt

    Hi, 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 )
    BEGIN

    				EXECUTE '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.

    Database database tutorial sharepoint sql-server sysadmin

  • SQL SERVER 2008
    J jonhbt

    Hi, 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

    Database database tutorial sharepoint sql-server sysadmin

  • SQL SERVER 2008
    J jonhbt

    I 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

    Database database sql-server sysadmin help question

  • Controlling LEDs From USB port
    J jonhbt

    I 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

    Hardware & Devices csharp help tutorial question

  • Parameters problem
    J jonhbt

    It didn't work either it is showwing me the following error.

    {System.Data.OleDb.OleDbException: Data type mismatch in criteria expression

    Database csharp help question

  • Parameters problem
    J jonhbt

    I 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?

    Database csharp help question

  • DataTable.Select() PRoblem
    J jonhbt

    I think that solved the problem. I stil have to takle the performance issue, but THANKS alot for your help

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    This 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

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    no 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.

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    thanks 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.

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    I 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."}

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    I 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);

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    Sry 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(); }

    C# help css announcement

  • DataTable.Select() PRoblem
    J jonhbt

    I 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.

    C# help css announcement

  • AUTO NUmber column in SQL server
    J jonhbt

    Hi 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

    Database question database sql-server sysadmin

  • MS ACCESS QUery
    J jonhbt

    can you relate me to an example please of how this is done. Thanks

    Database database help csharp question

  • MS ACCESS QUery
    J jonhbt

    Nothing 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

    Database database help csharp question

  • MS ACCESS QUery
    J jonhbt

    i tried but the same syntax error

    Database database help csharp question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups