Jump to content
Xtreme .Net Talk

jzamss

Members
  • Posts

    6
  • Joined

  • Last visited

About jzamss

  • Birthday May 14

Personal Information

  • Visual Studio .NET Version
    VS .NET Prof
  • .NET Preferred Language
    C#

jzamss's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks Toni
  2. Good Day to all. I want to dynamically create a Windows Form using reflection. The test code below is what I used. ------------------------- public Form CreateForm() { Control control = null; Type t = Type.GetType("System.Windows.Forms.Form"); if(t != null) { control = (Control) Activator.CreateInstance(t); } return (Form) control; } ------------------------- When running the code, the error below is generated... >>>> Could not load type System.Windows.Forms.Form >>>> from assembly Im still new to C# and hope you can give me your expert advice on this issue. Best Regards..... :)
  3. Good Day. I encountered a problem when filling a dataset using the OleDbDataAdapter. The scenario is like this: I created an object say, Record, that has a DataSet member variable in it. The DataSet's Tables and Columns definition are dynamically defined and created based on a XmlSchema. When filling a specific table in the DataSet, the SelectCommand.CommandText and the Parameters are dynamically created before calling the Adapter.Fill method. example sql: SELECT * FROM CUSTOMER WHERE id=@id where : @id = is created as a parameter for the SelectCommand and the Param.Value is set to a known value --------------------------------------------------------------- Error Message: Must declare the variable @id --------------------------------------------------------------- What is strange is that when using SqlConnection and SqlDataAdapter instead of the OleDbConnection and OleDbDataAdapter, the DataSet if properly filled and the program runs without problem. I think the problem is with the OleDbDataAdapter. I'm new to C# and hopefully you can give me some information and guidance. Best Regards...
  4. Good Day. I encountered a problem when filling a dataset using the OleDbDataAdapter. The scenario is like this: I created an object say, Record, that has a DataSet member variable in it. The DataSet's Tables and Columns definition are dynamically defined and created based on a XmlSchema. When filling a specific table in the DataSet, the SelectCommand.CommandText and the Parameters are dynamically created before calling the Adapter.Fill method. example sql: SELECT * FROM CUSTOMER WHERE id=@id where : @id = is created as a parameter for the SelectCommand and the Param.Value is set to a known value --------------------------------------------------------------- Error Message: Must declare the variable @id --------------------------------------------------------------- What is strange is that when using SqlConnection and SqlDataAdapter instead of the OleDbConnection and OleDbDataAdapter, the DataSet if properly filled and the program runs without problem. I think the problem is with the OleDbDataAdapter. I'm new to C# and hopefully you can give me some information and guidance. Best Regards...
×
×
  • Create New...