User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 374,006 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,847 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 1268 | Replies: 5
Reply
Join Date: Jan 2008
Posts: 43
Reputation: Alekhan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
Alekhan Alekhan is offline Offline
Light Poster

Question Access database,

  #1  
Jan 4th, 2008
Hello, hope all people around will be fine and enjoying programming. I want to do get data from the database which is available on internet domain while my application is window base application. Is there any complete method i can get data from the database.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Posts: 1
Reputation: 7awka is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
7awka 7awka is offline Offline
Newbie Poster

Re: Access database,

  #2  
Jan 4th, 2008
Originally Posted by Alekhan View Post
Hello, hope all people around will be fine and enjoying programming. I want to do get data from the database which is available on internet domain while my application is window base application. Is there any complete method i can get data from the database.


U could clarify a bit more in order that anyone can help you.
Reply With Quote  
Join Date: Jan 2008
Posts: 35
Reputation: mellamokb is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
mellamokb mellamokb is offline Offline
Light Poster

Re: Access database,

  #3  
Jan 4th, 2008
Hi Alekhan,

Please visit the following forum thread at vbforums:

http://www.vbforums.com/showthread.php?p=2223896

There is a discussion on connecting remotely to Microsoft Access using a pertinent connection string, along with some example code in VBA. Perhaps you can adapt the idea to your application:

Option Explicit
Dim adoConn As ADODB.Connection
Dim adoRst As ADODB.Recordset

Private Sub Command1_Click()'============================
Dim strConString As String
Dim strSQL As String
'assign connection string
strConString = "Provider=MS Remote;" & _
                   "Remote Server=http://192.168.1.1;" & _
                  "Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
                   "Data Source=MyRemoteDB;Persist Security Info=False"
        'initialize connection object variable
    Set adoConn = New ADODB.Connection
    'open connection
    adoConn.Open strConString, "admin", ""
        strSQL = "Select * from Orders"
        'initialize recordset object variable
    Set adoRst = New ADODB.Recordset
    With adoRst
        .Open strSQL, adoConn, , , adCmdText
        If Not .EOF Then
            Do While Not .EOF
                'read each record here
                '...
                .MoveNext
            Loop
            .Close
        End If
    End With

        'destroy recordset object if necessary (or do it when you unload the form)
    'Set adoRst = Nothing
        'destroy connection object if necessary (or do it when you unload the form)
    'Set adoConn = Nothing
End Sub 

~ mellamokb
Reply With Quote  
Join Date: Jan 2008
Posts: 43
Reputation: Alekhan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
Alekhan Alekhan is offline Offline
Light Poster

Re: Access database,

  #4  
Jan 4th, 2008
Thanks for assistance mr. Mell. I'll code this in my program and then let you know. I've one more thing to know by using vb 2005. Can i export data from excel file to database. If you can provide me some links that could help me. Thanks and take care.
Reply With Quote  
Join Date: Jan 2008
Posts: 35
Reputation: mellamokb is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
mellamokb mellamokb is offline Offline
Light Poster

Re: Access database,

  #5  
Jan 4th, 2008
You can import the data into Microsoft Access from Excel. Here is a page that talks about that:

http://office.microsoft.com/en-us/ex...008521033.aspx

1) Make sure the Microsoft Excel data is in list (list: A series of rows that contains related data or a series of rows that you designate to function as a datasheet by using the Create List command.) format: each column has a label in the first row and contains similar facts, and there are no blank rows or columns within the list.

2) Close the Excel workbook that contains the data you want to use in Microsoft Access.

3) In Access, open the database where you want to copy the Excel data.

4) On the Access File menu, point to Get External Data, and then click Import.

5) In the Import dialog box, click Microsoft Excel in the Files of type box.

6) In the Look in list, locate the file you want to import, and then double-click the file.

7) Follow the directions in the Import Spreadsheet Wizard.

Or you can use ODBC or OleDb connection strings to link to Excel from Microsoft Access and copy the data from the linked table into an Access table. If we're not talking about Access databases, then the ODBC option still applies, i.e., it is possible to import data from MS Excel into MS SQL Server by using ODBC or OleDb connection to Excel:

http://www.connectionstrings.com/?carrier=excel2007 [Excel 2007 Connection Strings]
http://www.connectionstrings.com/?carrier=excel [Excel 2000 - 2003 Connection Strings]

~ mellamokb
Reply With Quote  
Join Date: Jan 2008
Posts: 43
Reputation: Alekhan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
Alekhan Alekhan is offline Offline
Light Poster

Re: Access database,

  #6  
Jan 4th, 2008
Hello Thanks for your assistance, Now i want to do this thing through coding using VB8( VS 2005) Can I have the coding sample. Thank I want to automate. My application is window base and I want to extract data from access to xls then from xls to access please provide solution. Thank you!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS Access and FileMaker Pro Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 10:30 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC