import excel data from excel sheet to ms access database table
-
hi all, please help me in this problem.how can we import data from excel sheet to ms access database table .i am using c# windows application. thank you. regards obalesu n
-
hi all, please help me in this problem.how can we import data from excel sheet to ms access database table .i am using c# windows application. thank you. regards obalesu n
Access can import an excel spreadsheet directly, without using C#. If you go to the File/Get External Data/Import menu you will see that one of the file types is Excel. This is in Excel XP, I do not have Excel 2007 but I assume it will be the same. Hopefully this will solve your problem.
Bob Ashfield Consultants Ltd
-
Access can import an excel spreadsheet directly, without using C#. If you go to the File/Get External Data/Import menu you will see that one of the file types is Excel. This is in Excel XP, I do not have Excel 2007 but I assume it will be the same. Hopefully this will solve your problem.
Bob Ashfield Consultants Ltd
thank you. and i have faced another problem in my windows application(c#,ms access).i am using backend as ms access.i have written code like this. string s="datasource=C:\\cms\\cmsaccess.mdb"; string q="select * from users"; OledbConnection con=new OledbConnection(s); OledbDataAdapter adp=new OledbDataAdapter(q,con); DataSet ds=new DataSet(); adp.fill(ds,"users"); i have written like this in every form .but if i installed in server how the application access that database(C:\\cms\\cmsaccess.mdb) in clients .the database location may be changed in clients.i am facing this problem. this application must be run in network.please send solution for this problem. thank you regards obalesu n
-
thank you. and i have faced another problem in my windows application(c#,ms access).i am using backend as ms access.i have written code like this. string s="datasource=C:\\cms\\cmsaccess.mdb"; string q="select * from users"; OledbConnection con=new OledbConnection(s); OledbDataAdapter adp=new OledbDataAdapter(q,con); DataSet ds=new DataSet(); adp.fill(ds,"users"); i have written like this in every form .but if i installed in server how the application access that database(C:\\cms\\cmsaccess.mdb) in clients .the database location may be changed in clients.i am facing this problem. this application must be run in network.please send solution for this problem. thank you regards obalesu n
Put the mdb file on a network drive. Put the mdb file location in the app.config file, using a unc path - not 100% sure if a unc path will work, if not map a drive - google for net use Alternatively put the whole lot on the network and just give the users a shortcut You may experience performance problems if you have many users,Access is not designed to have lots of users, I would suggest if you are expecting more than about 10 or expect a lot of insert/update activity move to another type of database, for example sql server or mysql Hope this helps
Bob Ashfield Consultants Ltd
-
Put the mdb file on a network drive. Put the mdb file location in the app.config file, using a unc path - not 100% sure if a unc path will work, if not map a drive - google for net use Alternatively put the whole lot on the network and just give the users a shortcut You may experience performance problems if you have many users,Access is not designed to have lots of users, I would suggest if you are expecting more than about 10 or expect a lot of insert/update activity move to another type of database, for example sql server or mysql Hope this helps
Bob Ashfield Consultants Ltd
thanks for reply dear sir i don't have any idea about config file.and i wrote connectionstring as"datasource =C:\\cms\\cms.xls" .please send clearly idid't yet solve this problem. thank you regards obalesu
-
thanks for reply dear sir i don't have any idea about config file.and i wrote connectionstring as"datasource =C:\\cms\\cms.xls" .please send clearly idid't yet solve this problem. thank you regards obalesu
obalesu wrote:
i don't have any idea about config file
In which case try the C# help.
obalesu wrote:
i wrote connectionstring as"datasource =C:\\cms\\cms.xls"
This will only work if your excel file is on your C drive. You said its on the network, so it won't work will it. I suggest you try a bit of Google research
Bob Ashfield Consultants Ltd