Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to export a table from MS Access Database to Sharepoint

Status
Not open for further replies.

kumareshav

Programmer
Nov 14, 2007
10
US
I have a table created in MS Access Database. I want to export that table to sharepoint portal.

This can be done manually by following the below steps.

1. Right click the table in MS Access and select export.
2. Choose 'Save as Type' as Windows Sharepoint Services'
3. Then you need to provide the url of the sharepoint and then click next.
4. Table will be exported to Sharepoint.


I need these above steps to be done through vbscript. Please help me!!

-Kumaresh
 
What do you have so far?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
I haven't use access in any of my previous vbs code. Just started learning, I know how to create a object for the access application and to open the database.


Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase("D:\Technical Materials\Access\new.mdb")


Next Steps:
1. Need to find the table in that database.
2. Then to export that table to sharepoin service.
 
create the access object, then use a sql query to get your data. You can then use the recordset to populate SharePoint.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Can you tell me the functions (APIs) which we have to use?

-Kumaresh
 
Yes, there is one that should help you get started with this so the people at this site can assist better. That function is called GOOGLE.

[google]vbscript query access database[/google]

spoon.gif


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
I tried as what you said. But I didn't able to find populating or exporting that table into sharepoint.

Please help.
 
Post what you have so far for getting the data out of Access.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
'Retrieving Data from Access Database

Set objConnection= CreateObject("ADODB.Connection")
objConnection.Provider="Microsoft.Jet.OLEDB.4.0"
objConnection.Open "D:\Technical Materials\Access\new.mdb"
set rs = CreateObject("ADODB.recordset")
sqlquery = "SELECT * FROM NewTable"
rs.Open sqlquery, objConnection
Set objRecordSet = objConnection.Execute(sqlquery)
Do Until objRecordSet.EOF
Wscript.Echo "FName: " & objRecordSet.Fields.Item(0)
Wscript.Echo "LName: " & objRecordSet.Fields.Item(1)
Wscript.Echo "EID: " & objRecordSet.Fields.Item(2)
objRecordSet.MoveNext
Loop

This is what I have.

Thanks
 
OK, so do you already have a database within the SharePoint site that you want to import to?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Check this link out...may assist you on your way.


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
You did not respond to my previous question. Do you already have the database you want to import to?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Yes, we have a database for that sharepoint site. But is it possible to import using sharepoint site link?

-Kumaresh
 
You should be able to access the SharePoint database using SQL. From there you should then be able to access the content you are looking for.

Two KBs will be of interest of things that could block your access.




I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
you mean, we need to directly export the table into the database(Backend) of the Sharepoint. So, is it not possible to export table into a sharepoint site without database information/configuration details?
 
Not that I am aware of.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top