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
R

redivider

@redivider
About
Posts
19
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DataGrid list binding
    R redivider

    Hmmm.. Figured something aggravating out. RIAudit, out of necessity, uses public properties, instead of accessors. If i change

    public string Status;

    to

    public string Status {get; set;}

    then WPF is happy (though the object-ralational database i use is not). I guess I'll have write a wrapper for RIAudit, unless someone knows how to get around this. ??

    WPF css wpf wcf question

  • DataGrid list binding
    R redivider

    Can anybody see what's going wrong here? I get an empty grid with a blank row for each item in the ObservableCollection .

            <Custom:DataGrid Width="454" Height="396" Canvas.Left="8" Canvas.Top="4" Name="gridEvents" FontWeight="Bold" FontFamily="Nina" 
    			AutoGenerateColumns="False" SelectedIndex="0" FontSize="10.667" >
                <Custom:DataGrid.Columns>
                    <Custom:DataGridTextColumn x:Name="dgCol\_EVStatus" Header ="Status" FontWeight="Normal" IsReadOnly="True" />
    
                </Custom:DataGrid.Columns>
            </Custom:DataGrid>
    

    and

    dgCol_EVStatus.Binding = new System.Windows.Data.Binding("Status");
    ObservableCollection<RIAudit> _Audits = new ObservableCollection<RIAudit>();
    _Audits.Add(auditRec);
    gridEvents.ItemsSource = _Audits;

    WPF css wpf wcf question

  • advanced datagrid column binding (for a datetime)
    R redivider

    Thanks. That IValueConverter is fun and I'll use it, but i was wondering what the code would look like to use stringformat. I can't quite figure it out.

    WCF and WF database wpf wcf oop tutorial

  • advanced datagrid column binding (for a datetime)
    R redivider

    I'm using an unconventional object oriented database which uses a long to store datetimes. This is directly convertible to a DateTime, but how could i display it as a DateTime using column binding? Because of the object oriented database i can't add an accessor to the class that returns the long casted to a DateTime (ex. DateTime.FromFileTime(timeStamp) ), becuase the db does not know how to correctly handle it. Is there something I could do with string.format? Or something i could do if i had a different column type (instead of Microsoft.Windows.Controls.DataGridTextColumn)? Seems far-fetched, but how about a column that can bind to a method's return value? I'm trying to avoid having to inherit from the type used in the DB but as a last resort I could do that.

    WCF and WF database wpf wcf oop tutorial

  • Memory access exception instantiating c++ native code from /clr c++ code
    R redivider

    Not multi-threaded. NativeDocument is in another dll C# dll -> /clr dll -> c++ dll (w/ NativeDocument class)

    Managed C++/CLI c++ help csharp dotnet com

  • Memory access exception instantiating c++ native code from /clr c++ code
    R redivider

    Here is my setup. - c# wrapper calls managed c++ API code - managed c++ calls unmanaged API code (c++ compiled with the /clr flag, located in the same project) using static funtions - API tries to instantiate object defined in another dll (native c++)

    void Screen::EvaluateScreen(LPCTSTR lpStrScreen, LPCTSTR lpStrSetName, LPCTSTR lpStrPeriods)
    {
    NativeDocument *screenDoc = NULL;
    screenDoc = new NativeDocument;

    calling the constructor causes a "Attempted to read write protected memory. ....memory corupt?..." error in the contstructor code. I'm new to c++ coding as well as this interop stuff. Any ideas? Is there an issue instantiating native code from inside the /clr compiled c++? The code i'm using (EvaluateScreen) is lifted from another native DLL so the code in there should be good (i guess).

    Managed C++/CLI c++ help csharp dotnet com

  • How to cast to a type stored in a field
    R redivider

    When i have int i = 10; i = 5 * i; it knows i'm not trying to multiply 5 * i, but rather 5* the value stored in i. So i'm not trying to cast to a variable (_DataType), but rather the value stored in that variable (int, float, string)... How would generics come into play?

    C# question help tutorial

  • How to cast to a type stored in a field
    R redivider

    How do I use a field storing Type information?

    private Type _DataType;
    private Dictionary<int, object> _BlobData;

    ...
    _DataType cow = (_DataType)_BlobData[0];
    //the previous line shows compiler error
    //._DataType' is a 'field' but is used like a 'type'

    Is "Type" not the right type?

    C# question help tutorial

  • Reference errors using classes defined locally but then imported into a Webservice
    R redivider

    I have a forms project that will allow user to connect to a local database or a webservice hosting the data. So the flow goes something like: App builds request object (SearchCriteria) defined in a class library. Local data access layer and webservice both use the SearchCriteria object to run queries, and return a Results object (also defined in the class library). So my desktop app has a ClassLibrary project which defines the Request and Results classes. This dll is imported into the Webservice solution. I’ve developed an interface to define the contracts between the desktop app and the data provider (either the local DAL or the Webservice).

    public interface IDataAccess
    {
    DataTable GetCompanyMatches(SearchCriteria searchCriteria, out Results results);
    …
    }

    One edit to the Reference.cs file tells the compiler that my Webservice implements the interface. internal interface WSSoap : ITPDataAccess The problem is that when the Webservice returns the Results object the desktop app sees the type as Webservice.Results instead of ClassLibrary.Results, so the Webservice does not implement IDataAccess (even though I specify, in the webservice, webservice inherits from/implements IDataAccess.

    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class WebService : ITPDataAccess
    {…..}

    Is there a way to tell the WS to not put the ClassLibrary classes into the Webservice namespace? Is there some way on the app side to use the locally defined classes when interacting with the webservice? Basically how do i tell the compiler that they are the same thing, without rewriting the Reference.cs file??

    Web Development question database hosting help

  • Row associated with the currency manager's position cannot be made invisible
    R redivider

    You cannot make selected row/cell inviible. Use...

    dataGridView1.CurrentCell = null;

    C# database help

  • Targeting .Net Framework Client Profile for Standalone install
    R redivider

    I'm trying to set a VS setup project to use the client profile as the prerequisite. I've had successfull setup project builds using as a prerequisite 3.5 and 3.5 sp1, but i'm getting error: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFx35Client\DotNetFx35ClientSetup.exe' in item '.NET Framework Client Profile' can not be located on disk. I've completed the setup mentioned in MS's 3.5 sp1 readme (section 2.3.1.1). So how do set the client profile as the prerequisite? Do i need to create and edit a "Deployment.xml" file? If so where does it go?

    .NET (Core and Framework) csharp dotnet visual-studio com sysadmin

  • Using IFs in T-SQL select statement
    R redivider

    Thanks. I'm just getting started and coundn't find anything without knowing the keywords to look for.

    Database database security regex help question

  • Using IFs in T-SQL select statement
    R redivider

    Thanks much That works wonderfully for this case. However, what if i wasn't skipping null values. What if the default value was 0 and not null?

    Database database security regex help question

  • Using IFs in T-SQL select statement
    R redivider

    Here is my delema. A company row can have multiple representations in the security table, based on the priusa or prican values in the company table matching the iid values int he security table, or the values in company table being null, in which case i just want to match the cue of the first iid listed for the key in the security table. The If section works if I change out the copmany.key references for a literal value, so as far as i can tell its having an issue with the assignment of the value to security.iid = (IF...). Any ideas? SELECT company.key, company.name, security.cue FROM company LEFT OUTER JOIN security ON company.key= security.key AND security.iid = (IF (select priusa FROM company WHERE key = company.key) is NOT NULL BEGIN select priusa FROM company WHERE key= company.key END ELSE IF (select prican FROM company WHERE key= company.key) is NOT NULL BEGIN select prican FROM company WHERE key= company.key END ELSE BEGIN select TOP 1 iid FROM security WHERE key= company.key ORDER BY security.iid END) WHERE (company.name like @name)

    Database database security regex help question

  • Programatically determine variable name
    R redivider

    Is there a way I can determine the name of the variable that is being accessed. In the following example, when I call Item22.Description (or any other property of BigClass), I'd like to be able to find variablename (Item22 in this case).

    class BigClass
    {
    public static Hashtable DescriptionsTable; //this would be a singleton
    DataItem Item01;
    ....
    DataItem Item64;
    }

    class DataItem
    {
    double _Value;
    string Description
    { get { return BigClass.DescriptionsTable[variablename]; } }
    }

    If I don't have access to this name I figure I'll have to add a second property to BigClass for each Item (ex. Item22Description...), which seems like a waste. And I don't want to have the descriptions in each BigClass because they can get quite lengthy and there will be hundreds of BigClass instances at a time. Any ideas? If there's another option, how could I re-architect without wasting too much space?

    C# tutorial question

  • Enable Database connection change
    R redivider

    I have an application that I setup by adding a DataSet .xsd file to my project and then dragging tables from the Server Explorer data connections area. This automatically sets up the connection string in about a dozen places. Now I want the user to be able to point to the database they want to use, but I'm not sure where the connection needs to be updated. The connection string exist in the main solution's Properties\Settings.settings, Properties\Settings.designer.cs In the data access layer project's app.config Properties\Settings.settings, Properties\Settings.designer.cs How would i update this value? From where (and how) should i read it when the app starts up, or if its being updated programatically would i have to save it to a custom file and read if from there?

    C# database sysadmin question announcement workspace

  • Inner Join to match multiple rows in lookup table
    R redivider

    Thank you very much. Never would have got that on my own. But on some servers the description table is empty, and i'm not getting any return rows. How can i make it optional, to say Return row for key='123' and add the descriptions IF they exist in the descriptions table?

    Database question regex

  • Inner Join to match multiple rows in lookup table
    R redivider

    So. I'm trying to match multiple codes (in one record) to their descriptions as listed in another table. So I have... TABLE 1 with columns: Key, Code1, Code2 TABLE 2 with columns: Code, Description ...which are tables I have no control over. I want to do an inner join so that my new table will have columns... Key, Code1, Code1Description, Code2, Code2Description. Its easy enought to match one SELECT Table1.*, Table2.description AS Code1Description FROM Table1 INNER JOIN Table2 ON Table1.Code1=Table2.Code How do i expand this to 2 or 3 or 4 different codes??? Please?

    Database question regex

  • Inheritance of class properties
    R redivider

    I'm trying to figure out how to override the value of a propery for a parent class in a child class. For example, i have public class Base { public virtual string _Caption="parentresult";} public class Child { public override string _Caption="childresult";} But the "virtual" and "override" keywords raise errors during compilation("modifier not valid for this item). They work if I set them up accessor methods, but I shouldn't have to do that (should I?). Is it possible to make them consts, also?

    C# tutorial oop 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