MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I use MaxScanRows in C# source code to import the ex

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ODBC Dotnet
Author Message
Manoj Kumar Goud



Joined: 08 Aug 2007
Posts: 1

PostPosted: Thu Oct 12, 2006 3:06 am    Post subject: How can I use MaxScanRows in C# source code to import the ex Reply with quote

when i imported excel sheet to datagrid some of values are ignored.If i
change the TypeGuessRows registry key value in path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines to 0 then its working
fine .But it is not the right way to change the registry key.So I followed
alternative way.I used MaxScanRows in my source code .But it has no
effect.Can anyone please help me about this problem.Is there any way how to
use MaxScanRows property, so that it will work fine.I tried in different way
like MaxScanRows=0/MaxScanRows=FFFFFFFF but no effect.Please help me out so
that I ll be glad to u.

Archived from group: microsoft>public>dotnet>framework>odbcnet
Back to top
View user's profile Send private message
Paul Clement



Joined: 08 Aug 2007
Posts: 154

PostPosted: Thu Oct 12, 2006 3:16 pm    Post subject: Re: How can I use MaxScanRows in C# source code to import th Reply with quote

On Wed, 11 Oct 2006 23:06:02 -0700, Manoj Kumar Goud
wrote:

¤ when i imported excel sheet to datagrid some of values are ignored.If i
¤ change the TypeGuessRows registry key value in path
¤ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines to 0 then its working
¤ fine .But it is not the right way to change the registry key.So I followed
¤ alternative way.I used MaxScanRows in my source code .But it has no
¤ effect.Can anyone please help me about this problem.Is there any way how to
¤ use MaxScanRows property, so that it will work fine.I tried in different way
¤ like MaxScanRows=0/MaxScanRows=FFFFFFFF but no effect.Please help me out so
¤ that I ll be glad to u.

Try specifying the IMEX argument:

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=e:\\My Documents\\Book2.xls;" +
"Extended Properties=" + (char)34 + "Excel 8.0;HDR=Yes;IMEX=1;" + (char)34;


Paul
~~~~
Microsoft MVP (Visual Basic)
Back to top
View user's profile Send private message
Manoj Kumar Goud



Joined: 08 Aug 2007
Posts: 2

PostPosted: Fri Oct 13, 2006 12:48 am    Post subject: Re: How can I use MaxScanRows in C# source code to import th Reply with quote

Hi Paul,
thanks for giving some tips.I also used IMEX=1 but no result.Please see my
string what I used in my program.

private const string EXCEL_CONNECTION_STRING_1 =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";

private const string EXCEL_CONNECTION_STRING_2 = ";Extended
Properties=\"Excel 8.0;;HDR=No;MaxScanRows=0;IMEX=1\"";

Is there any other changes in this string

Regards,
Manoj

"Paul Clement" wrote:

> On Wed, 11 Oct 2006 23:06:02 -0700, Manoj Kumar Goud
> wrote:
>
> ¤ when i imported excel sheet to datagrid some of values are ignored.If i
> ¤ change the TypeGuessRows registry key value in path
> ¤ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines to 0 then its working
> ¤ fine .But it is not the right way to change the registry key.So I followed
> ¤ alternative way.I used MaxScanRows in my source code .But it has no
> ¤ effect.Can anyone please help me about this problem.Is there any way how to
> ¤ use MaxScanRows property, so that it will work fine.I tried in different way
> ¤ like MaxScanRows=0/MaxScanRows=FFFFFFFF but no effect.Please help me out so
> ¤ that I ll be glad to u.
>
> Try specifying the IMEX argument:
>
> ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
> "Data Source=e:\\My Documents\\Book2.xls;" +
> "Extended Properties=" + (char)34 + "Excel 8.0;HDR=Yes;IMEX=1;" + (char)34;
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
Back to top
View user's profile Send private message
Manoj Kumar Goud



Joined: 08 Aug 2007
Posts: 2

PostPosted: Fri Oct 13, 2006 12:51 am    Post subject: Re: How can I use MaxScanRows in C# source code to import th Reply with quote

Hi Paul,
Thanks for giving some tips.I also used IMEX=1 still no effect.Please see my
connection string

private const string EXCEL_CONNECTION_STRING_1 =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";

private const string EXCEL_CONNECTION_STRING_2 = ";Extended
Properties=\"Excel 8.0;;HDR=No;MaxScanRows=0;IMEX=1\"";

Is there any modification or other property ,I have to add to work properly
Thanks

"Paul Clement" wrote:

> On Wed, 11 Oct 2006 23:06:02 -0700, Manoj Kumar Goud
> wrote:
>
> ¤ when i imported excel sheet to datagrid some of values are ignored.If i
> ¤ change the TypeGuessRows registry key value in path
> ¤ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines to 0 then its working
> ¤ fine .But it is not the right way to change the registry key.So I followed
> ¤ alternative way.I used MaxScanRows in my source code .But it has no
> ¤ effect.Can anyone please help me about this problem.Is there any way how to
> ¤ use MaxScanRows property, so that it will work fine.I tried in different way
> ¤ like MaxScanRows=0/MaxScanRows=FFFFFFFF but no effect.Please help me out so
> ¤ that I ll be glad to u.
>
> Try specifying the IMEX argument:
>
> ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
> "Data Source=e:\\My Documents\\Book2.xls;" +
> "Extended Properties=" + (char)34 + "Excel 8.0;HDR=Yes;IMEX=1;" + (char)34;
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Can you Check My ODBCDataReader Code? I have an ODBC IBM Unidata SQL table which I'm successfully connecting to via the code below. I'm issue a select statement which, when issed using another SQL tool, returns a valid set of address data. But in my case, I'm not getting any string data. Am

Data object code generators From a series of database table or query definitions to a set of business objects that implement all the needed interfaces iList etc) there's an awful lot of very mechanical coding to do. I'm looking for products that automate this process.

ODBC / ASP.NET Connection - Password in Code I have developed an ASP.NET site that uses an ODBC connection to a MS SQL Server. I have set up the ODBC connection in my web application, but have to put the password in the properties of the I have been asked to try and use this ODBC

need code to develop a UI to upload data from .csv file to o hi, I need the code to develop a UI that uploads or inserts data from a ..csv file to the oracle 9i table using any of the java script, jsp, servlets) ony as i am little familiar with these . Its very urgent as i need it. Plzz anyone if th

Article : Code Access Security Part - 2 (.Net FrameWork Tool Hey Guys, Before we start with our sample app we need to view the security configuration files on the machine. You will find them under Enterprise Level Security configuration file is :- enterprise.co
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ODBC Dotnet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group