User Profile

Collapse

Profile Sidebar

Collapse
johnlarson
johnlarson
Last Activity: Nov 7 '07, 06:13 PM
Joined: Nov 3 '07
Location: South Lake Tahoe,CA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • johnlarson
    started a topic select statement with variables
    in .NET

    select statement with variables

    I am trying to populate a datagrid from a select statement that contains variables. I can query the dbf file and get the whole file but when I try a select statement with variables from text box and combo box input the datagrid has the field names at the top but no data here is my code.
    Code:
    private void button2_Click ( object sender , EventArgs e )
                {
                string field = comboBox1 . Text;
    ...
    See more | Go to post

  • I have cured this problem with this line
    Code:
    fullPath2 = Path . GetDirectoryName ( openFileDialog1 . FileName );
    then I feed fullpath2 into my connection string and It worked. thanks for all of your help
    John Larson
    See more | Go to post

    Leave a comment:


  • I am using the same file path as you are and my application cannot find the file. I have changed a lot of code this is what I am trying to make work
    Code:
    try
             {
             string conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\ZIP.DBF;Extended Properties=dBase IV";
             OleDbConnection conn = new OleDbConnection ( conString );
             command = conn . CreateCommand ( );
    ...
    See more | Go to post

    Leave a comment:


  • the fille exists it is a .dbf file from the usps. I have been debugging and the line that triggers the exception is
    Code:
    ZipCode.DataSource = DataSet . Tables [ fullPathname ] . DefaultView;
    when I put a watch on the line it says the DataSet.Tables[fullPathname] is null
    thanks for your time
    John Larson...
    See more | Go to post

    Leave a comment:


  • johnlarson
    started a topic Opening a file in visual c# not a valid filename
    in .NET

    Opening a file in visual c# not a valid filename

    I am using an openfiledialoge to open a dbf file in a windows app. the error I get is c:\myfile.dbf not an valid filename. here is my code
    Code:
    private void button1_Click ( object sender , EventArgs e )
                {
                System.Windows.Forms.DataGrid ZipCode=null; 
                System . IO . Stream myStream = null;
                OpenFileDialog openFileDialog1 = new OpenFileDialog ( );
    ...
    See more | Go to post
No activity results to display
Show More
Working...