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
H

Hum Dum

@Hum Dum
About
Posts
233
Topics
107
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Too much white background
    H Hum Dum

    Its hurting eyes to see continuously. too much bright, would be better if its little dark, eye friendly.

    Site Bugs / Suggestions

  • Parsing a Path to the Server
    H Hum Dum

    Modify it like

    protected void Page_PreRender(object sender, EventArgs e)
    {
    DataTable dt = new DataTable("INFO");
    dt.Columns.Add("url", typeof(string));

        string\[\] fileEntries = Directory.GetFiles(Server.MapPath("~/Documents/"));
    
        foreach (string f in fileEntries)
        {
            DataRow dr = dt.NewRow();
            dr\["url"\] = " [DOWNLOAD](~/Documents/" + Path.GetFileName\(f\) + ") ";
            dt.Rows.Add(dr);
        }        
        grid.DataSource = dt;
        grid.DataBind();
    }
    
    ASP.NET html css sysadmin json help

  • How to Merge a particular column in gridview using asp.net ?
    H Hum Dum

    Merge column of table (data source). you have select statement like

    Select A, B, C from tableName

    so modify it like

    Select A = A+B, C from tableName

    If you can't access select statement, then you have to modify datasource object prior setting to grid !

    ASP.NET csharp asp-net algorithms tutorial question

  • Having trouble connecting with my datasource
    H Hum Dum

    deadEddie wrote:

    string selectSql = "SELECT Count(*) FROM AccountTransactions WHERE UserID = @UserID";

    You are selecting column which are not present is select statement.

    deadEddie wrote:

    returnArray[0] = Convert.ToString(dataSet.Tables["AccountTransactions"].Rows[lastRow]["Balance"]); returnArray[1] = Convert.ToString(dataSet.Tables["AccountTransactions"].Rows[lastRow]["TransactionNo"]);

    For accessing balance and transaction include them is select statement, like

    Select Balance, TransactionNo FROM AccountTransactions WHERE UserID = @UserID;

    C# help csharp database visual-studio data-structures

  • Buttons on C# sharp app now cause System sounder to beep!
    H Hum Dum

    glennPattonWork wrote:

    rebuilt it after an evil spyware attack

    Had you installed all necessary software/libraries/framework need to run that program ?

    C# question csharp help

  • Convert PDF to Word using C#
    H Hum Dum

    If you dont want to use any 3rd party like iTextSharp. Then create your own library is only option left. Or someone here knows a way may shed a light !!

    C# csharp question

  • Microsoft Report Viewer runs great on my local machine but not on the web host server !!!
    H Hum Dum

    Check Whether required .Net framework installed on that server or not, along with all necessary software. You hadn't mentioned any error, just not displaying data ! Check whether on that server itself it is showing or not? Or its only at client side.

    ASP.NET sysadmin hosting help

  • Error: Index was out of range. Must be non-negative and less than the size of the collection
    H Hum Dum

    Check this, if it helps

    ASP.NET help css database

  • app working in window Xp but not in window 7
    H Hum Dum

    Luc Pattyn wrote:

    I can't tell what is wrong in your P/Invoke code as you aren't showing any of it.

    The code is same not a bit change from the article i mention i.e. Use PI invoke for serial communication. Updated code is in download link of article, on MSDN(article) page code is not updated. In case of not working modem ReceiveThread() of CommBase.cs is not behaving as its in working modem.

    eventMask = (uint)Marshal.ReadInt32(uMask);
    //some code

    //not able to get inside this block in not working modem and OnRxChar(buf[0]) event is not raised
    if ((eventMask & Win32Com.EV_RXCHAR) != 0)
    {
    do
    {
    gotbytes = 0;
    if (!Win32Com.ReadFile(hPort, buf, 1, out gotbytes, unmanagedOv))
    {
    int x = Marshal.GetLastWin32Error();
    throw new CommPortException("IO Error [004]");
    }
    if (gotbytes == 1) OnRxChar(buf[0]);
    } while (gotbytes > 0);
    }

    //same for OnStatusChange event is not raised
    uint i = 0;
    if ((eventMask & Win32Com.EV_CTS) != 0) i |= Win32Com.MS_CTS_ON;
    if ((eventMask & Win32Com.EV_DSR) != 0) i |= Win32Com.MS_DSR_ON;
    if ((eventMask & Win32Com.EV_RLSD) != 0) i |= Win32Com.MS_RLSD_ON;
    if ((eventMask & Win32Com.EV_RING) != 0) i |= Win32Com.MS_RING_ON;
    if (i != 0)
    {
    uint f;
    if (!Win32Com.GetCommModemStatus(hPort, out f)) throw new CommPortException("IO Error [005]");
    OnStatusChange(new ModemStatus(i), new ModemStatus(f));
    }

    above are few lines of ReceiveThread for reference which are not executing as excepted.

    Luc Pattyn wrote:

    Your Win7 probably is 64-bit,

    Its 32 bit.

    Luc Pattyn wrote:

    (One way to circumvent this problem is by building for "x86" rather than "AnyCPU").

    This i will try. But have doubt as same code is working in same window 7 but with different card. But not working card respond with .Net 2.0 serial port class under same window 7.

    C# help tutorial question

  • app working in window Xp but not in window 7
    H Hum Dum

    WRT to you link, i tried but no luck. then i replace hardware card/modem with another one. And on this everything worked as excepted, without any code modification. But same old card is working on XP, also responding to hyper-terminal in win 7. Then i tried SerialPort class of .Net framework 2.0 wrt to this Article and old modem/card responded as excepted in win 7. I am using this article for PI invoke. My question is why its not working in win 7 with PI invoke code. but responding with SerialPort class of .Net 2.0, also to hyper-terminal. Old modem is PCI card, while new is PCI express. Any light/idea you shed highly appreciated. below are query modem log of both old(not working) and new(working) Not Working Query Modem log

    01-06-2012 20:48:20.029 - File: C:\Windows\system32\tapisrv.dll, Version 6.1.7600
    01-06-2012 20:48:20.045 - File: C:\Windows\system32\unimdm.tsp, Version 6.1.7600
    01-06-2012 20:48:20.045 - File: C:\Windows\system32\unimdmat.dll, Version 6.1.7600
    01-06-2012 20:48:20.045 - File: C:\Windows\system32\uniplat.dll, Version 6.1.7600
    01-06-2012 20:48:20.060 - File: C:\Windows\system32\drivers\modem.sys, Version 6.1.7600
    01-06-2012 20:48:20.060 - File: C:\Windows\system32\modemui.dll, Version 6.1.7600
    01-06-2012 20:48:20.060 - File: C:\Windows\system32\mdminst.dll, Version 6.1.7600
    01-06-2012 20:48:20.060 - Modem type: Conexant 56K Voice Modem
    01-06-2012 20:48:20.060 - Modem inf path: oem15.inf
    01-06-2012 20:48:20.060 - Modem inf section: Modem1
    01-06-2012 20:48:20.060 - Matching hardware ID: pci\ven_2003&dev_8800&subsys_280016ef
    01-06-2012 20:48:20.060 - Opening the modem device failed with error 00000020
    ATQ0V1E0 - OK
    AT+GMM - Conexant 56K Voice Modem
    Ver4.20.01AG11
    AT+FCLASS=? - 0,1,2.0,8
    AT#CLS=? - 0,1,2.0,8
    AT+GCI? - +GCI:B5
    AT+GCI=? - +GCI:(B5)
    ATI1 - Conexant 56K Voice Modem
    Conexant
    Ver4.20.01AG11
    Rev
    ATI2 - Conexant
    Ver4.20.01AG11
    Rev
    MV (CID\SPK)
    ATI3 - Conexant
    SL8800 PCI
    ATI4 - Active Profile:
    S00=000 S01=000 S02=043 S03=013 S04=010 S05=008 S06=002 S07=060
    S08=002 S09=006 S10=128 S11=100 S12=050 S13=000 S14=000 S

    C# help tutorial question

  • app working in window Xp but not in window 7
    H Hum Dum

    yes i tried that also. but application not working as excepted. After compatibility mode setting, application able to read and write on serial port but unable to access modem status (GSM modem status, its capturing in XP like ring, busy etc).

    [DllImport("kernel32.dll")]
    public static extern Boolean GetCommModemStatus(IntPtr hFile, out UInt32 lpModemStat);

    Also for GSM if i use ATZ command its responding, but not for AT. It has to be with security, access control setting. any other idea. regards

    C# help tutorial question

  • app working in window Xp but not in window 7
    H Hum Dum

    It's 32 bit Window application using kernel32.dll for serial port communication. (I know about System.IO.Ports.SerialPort class existence, but application run fine in XP.) In window 7 its not working as expected. I disabled UAC, run as administrator. This started application but some function are not executing properly. Like for GSM modem interface, Modem response for AT command is OK, but in window 7 its not responding for app. But if i use hyper-terminal in win7, its responding for AT. What needs to be done to able to run the app? I tried Google before posting here, but not much help. I think, its kernel32.dll which the app unable to access or window 7 is restricting some function/feature of it? Can any one please guide/help me? regards

    C# help tutorial question

  • Equivalent in MS Sql
    H Hum Dum

    What is equivalent of MS Access IFF in MS Sql for this expression

    IIf([ID_SECTION]=1,1,IIf([ID_SECTION]=2,2,IIf([ID_SECTION]=3,[ID_Tariff_Gender],0)))

    Will it be like

    CASE WHEN [ID_SECTION]=1 THEN 1
    ELSE
    CASE WHEN [ID_SECTION]=2 then 2
    ELSE
    CASE WHEN [ID_SECTION] = 3 then [ID_Tariff_Gender] ELSE 0 END
    END
    END

    Is it correct ? Any comments !!

    Database question database

  • Get start date
    H Hum Dum

    How about subtracting count of leaves from endDate like

    SELECT @SDate = DATEADD (day, - @holidayCount, @endDate)

    Database database help question

  • Need Help on Save asp.net from in folder on button click asp.net c#
    H Hum Dum

    You can create a PDF file of that form instead on image. You know the format of page, so create a string with proper formatting and from this string create PDF file using iTextSharp or any other PDF library. regards :)

    ASP.NET csharp asp-net database sysadmin help

  • Page Navigation
    H Hum Dum

    you are terminating response at this line

    pravin_mun wrote:

    Response.End();

    comment out this line, Response.Redirect("URL") should work then. Regards

    C# sysadmin help question

  • What am I doing wrong?
    H Hum Dum

    Member 8363084 wrote:

    string[] files = Directory.GetFiles("C:\\Users", ".txt");

    you have to use * here as

    string[] files = Directory.GetFiles("C:\\Users\\", "*.txt");

    regards

    C# csharp linq question lounge

  • Not getting Output parameter value
    H Hum Dum

    Enterprise Library ExecuteDataSet method not setting Output parameter value. The value of output parameter is always null.

    using (DbCommand cmd = db.GetStoredProcCommand("s_sProcName"))
    {
    DataSet ds = new DataSet()
    db.AddInParameter(cmd, "@p_sFoo", DbType.String, "Bar");
    db.AddOutParameter(cmd, "@po_iOut", DbType.Int32, 4)
    ds = db.ExecuteDataSet(cmd);
    }

    How can i get value of Output parameter? Can any one please !!

    C# question database

  • content is outdated
    H Hum Dum

    Planning to use Microsoft Enterprise Library 5.0 for Data Access in an application. Here Microsoft.Practices.EnterpriseLibrary.Data Namespace its saying content are outdated, but its latest library. On many of methods same outdated message appears. a) Is it OK to use this, Will class/methods works in future? b) If its outdated then why MS promotes to use/follow patterns ? c) Are their other alternative, like MS suggest in case of depreciated methods? regards

    C# com question

  • hide repeating data
    H Hum Dum

    table data is

    col1 col2 col3 col4

    1 1a 1b 1c
    1 1a 1d 1e
    1 1b 1f 1g
    2 2a 2b 2c
    2 2a 2d 2e
    2 2b 2f 2g
    2 2b 2h 2i
    2 2b 2j 2k

    Need to format output as

    col1 col2 col3 col4

    1 1a 1b 1c
    1d 1e
    1b 1f 1g
    2 2a 2b 2c
    2d 2e
    2b 2f 2g
    2h 2i
    2j 2k

    i.e hiding repeating data. I am thinking creating a data table object then check for repeating data column, if repeat then add blank column, else add same column. Is there any other way of achieving this ? what if table contain 10000 rows ? Any logic/help/link/post will be much helpful. regards

    ASP.NET help 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