.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How do I read an Dbase V Table with more than 400 fields?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :

I need to read a dbase V table with more than 500 fields.

The example:


string filepath = "c:\\prueba\\";


OdbcConnection CC = new OdbcConnection("Driver={Microsoft dBase Driver (*.dbf)};SourceType=DBF;SourceDB=<

View Complete Post

More Related Resource Links

How to read Excel table?


If I  use Microsoft.Jet.OLEDB.4.0 to retreive for example named range or sheet from Excel and use it as data source for some server control on the ASP page, everything works fine. But when I try to get table from Excel like this: "select * from [Table1]", debugger complains that database engine could not find object Table1. So how should I reference Table1 in Excel file so that the database engine could find it?

How to access the refrenced table fields in Ilist object of table MVC asp.net



I have 2 tables, master, detail. 1.master table have fields (id, username, plan)-->id is primary key (PK) 2. detail table have fields (srNo,id, worksummary, ... )--> srNo is PK.

I have created foreign key relationship from detail to .master table for "id" field.

the code is:

IList<detail> objDetail=new List<detail> (); 
IList<master> objMaster = new List<master> ();
string[] sarray = queryFields.Split('|');//

for (int i = 0; i < sarray.Length; i++)
string[] sfields = sarray[i].Split(',');

if (sfields[0] != "")

objDetail.Add(new _detail { Id = count , modify = sfields[1].ToString(), verified = sfields[2], I});


I have problem to add fields in "objDetail" using Add method. But I am unable to access the reference field "Id" , rest of the field of detail table can be accessed using objDetail.

How can I access the "Id" field from objDetail object to add in IList.

I want to solve this problem

I have added new fields to a table in SQLserver, why could not find these new fields in Analysis Ser

I have added new fields to a table in SQLserver, why could not find these new fields in Analysis Services database source view?  My version is 2005.

List view - inline editing with read only fields

I'm new to sharepoint and using SP2010. I would like to use the inline editing feature of list view and at the same time to lock some of the fields. Is there a simpler way to achieve this like adding some field property using SP designer?

Reviewer suggested common table expression instead of adding 12 fields

So during a code review a DB Mgr suggested that I use a common table function instead of adding the fields below. No idea how to possibly do this. Anyone have any ideas? Here is a code snippet that he wants to lose: SELECT   LP .leaseID, sum   (paymentAmount1+paymentAmount2+paymentAmount3+paymentAmount4+paymentAmount5+paymentAmount6+paymentAmount7+paymentAmount8+paymentAmount9+paymentAmount10+paymentAmount11+paymentAmount12) as restPayment FROM   leasePaymentScheduleDetails AS L inner join leasePaymentSchedules AS LP ON L.leasePaymentScheduleID = LP.leasePaymentScheduleID WHERE   paymentYear>=@curyear+5 GROUP   BY LP .leaseID   Any input is appreciated.

How to read records in a table one by one?

hi friends, i have briding table that holds userid and roleids, i was given the user_id to get all the role_id s that this user has. i could do a select statement with a where clause. select role_id from UserRoles where user_id = 28 this returns a list of the role_id, But how do read each row returned by the above statement so that i could insert each row to another (virtual) table? thanks          

Joins on non-indexed fields and table primary keys.


I have two tables (a,b) each with a primary key (which are clustered indexes). When I issue the t-sql statement

delete XX from t1 XX inner join t2 on (xx.A2 = t2

how can i drag and drop fields of table in teh desing surface


I am followint the insructions of this walkthrough of VS2003


adn in a part say this

  •  8   Find the authors node and expand it to show the fields in the authors table.
  •  9   Using CTRL+Click, select the au_id, au_lname, au_fname, and city fields.
  •  10  Drag these fields from Server Explorer onto the design surface
  • Now i am using VS2008 

    When i try to drag and drop i can not made it is maybe because of the differences between 2003 and 2008 versions

    how can do it in VS2008?


    How to INSERT new row values from two different sources, all fields from a table plus one additional

    --Loading the single row returned by a table valued function into a temp table works fine like this:
    DECLARE @techNumLoop VARCHAR(25)
    DECLARE @myTemp TABLE (
     Names Varchar(25)
    ,Item_Count Integer
    ,Expense_AP MONEY
    --,[...20 more fields]
    --Loop a while
    INSERT @myTemp SELECT * FROM ufn_FindSomeRow(@techNumLoop)
    --And finally display a table with one row for each function call
    SELECT * FROM @myTemp
    --My Question: what if I would like to also display the value of @techNumLoop passed in to ufn_FindSomeRow?
    --Then I add a field to @myTemp to hold it:
    DECLARE @myTemp TABLE (
     TechNum VARCHAR(25)--added

    Datetime fields within a fact table


    Morning all,

    I'm currently defining a fact table in my first datacube and have a question (basic one albeit).  Can a datetime column be left in a fact table as a measure or should this be stored only within a dimension table?  The other columns I have left in thus far are foreign keys for the dimension tables.

    Any pointers appreciated.



    How to ensure all the fields from a source file is mapped to a destination file \ table


    I am trying to verify if the SSIS package created by someone else has all the fields from source mapped to a destination table columns.

    How to do that?

    Also are there any best practices for testing for correctness of SSIS package.

    read specific records from table



    i want to read specific record form a table for example (tb1)

    that consist of 3 field and each field contain of 100 record

    i want to read record from 80 to 90 but with out using ID field

    How to update table where id needed to be read through from another table.



    I have update statement.

    student (NOLOCK) ON student.ID = SPECT.ID
    ON CLSS.GID = student.GID
    WHERE student.PID =  '20201'
    AND CLSS.PID = '20201'

    However, student.PID  and ClSS.PID need dynamically reach through from table CLSS to get each row of PID.

    Here my table CLSS

    Rowid  Username    PID        gid         nit       sid      NEWSID
    7          cc                20201    00        1           AA       XX

    8          cc                20201    02        1           SS       AA

    9          dd              11000     0N &n

    WSS 3.0 Making fields read only when editing an entry


    Is it possible to make specific fields in the EditForm Read Only so that once data has been entered it cannot be changed?

    I have name and address information that once input I do not want to be changed however other fields in the form will need to be modified several times so if I can make some fields Read Only this will ensure the user modifying will only be able to change certain fields.

    Some forums are suggesting Java Script however I am uncertain of whether this is the best or only option.

    Thank you

    OPENROWSET, dBase files and fields containing underscores


    I've got a couple dbf files (from Visual FoxPro) that I routinely import into a local SQL server (via OPENROWSET) for further manipulation.  I've been doing this for a while now, but today I realized that not all of the data is getting imported correctly.

    There are several columns that act as indicators, using a single character.  There are 15 of the columns, and generally anywhere from 5 to 15 of them may be populated:

    Record1 s w X f d + y

    Record2 s w X f d +

    Record3 s w X f _ y

    Record y s _ F b d

    ...and so on.  What I've noticed is that fields using a single underscore are getting imported as NULL.  To further complicate things, the fields following the underscore are then NULL as well, but for some reason, the OPENROWSET recovers, and the NULLs stop once the 15 indicator columns are finished.  So basically  a record that has "y s _ F b d" becomes "y s NULL NULL NULL NULL".

    Obviously I can scrub this file before importing it, but it kind of defeats the purpose of automating the import via the OPENROWSET.  I don't know if anyone else has run into this, as I searched the web and couldn't find anything, but any help would be appreciated. Just for background, here is the OPENROWSET command I use:


    List View Fields/Columns read only


    i programmtically add a view to a SP List. Within this view I want to make some columns read only to certain group of users. How should I implement this?

    Here is my code for creating an view programmatically:
    public partial class _Default : System.Web.UI.Page 
        protected void Page_Load(object sender, EventArgs e)
            SPSite mySite = new SPSite("http://spserv");
            //SPWeb myWeb = mySite.OpenWeb("/vst");
            using (SPWeb oWebsite = mySite.AllWebs["website_name"])
                oWebsite.AllowUnsafeUpdates = true;
                SPList oList = oWebsite.Lists["list_name"];
                SPViewCollection collViews = oList.Views;
                string strViewName = "CustomView";

    Infopath 2007 Form with the repeating / non repeating fields in the same table



    Hi ,

    I am trying to create infopath 2007 form with the repeating / non repeating fields with in the same table. Basically i have to get the few column values  from the sharepoint List and remaining will be free text.


    A     B   C     D      E    F  

    x    x    x     e        a    y

    x    x    x    s      s     g

    x    x    x    h       t    w

    x    x    x    j       h    t


    X - Values getting from the sharepoint list by using repeating table

    remaing values should be not repeating fields and  should be text fields.

    anyideas on this. please let me know.



    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend