473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can somebody help me ?

Hi,

I managed to open a msaccess database with python.

import win32com.client.dynamic
db1 = win32com.client.dynamic.Dispatch("Access.Applicati on")
dbname = "D:\\Project\\Database\\database.mdb"
db1.OpenCurrentDatabase(dbname)

Now, I have the problem, that I don't know how I can read the lines
of my table. Can somebody help me please and give me an example code ?

I'm looking forward to your answers, and thank u very much in advance.

Cheers

Patrick
Jul 18 '05 #1
3 1385
You should be able to get at the data with something like this:

cdb=db1.CurrentDb()
rs=cdb.OpenRecordset('yourtablename')
while not rs.EOF:
print rs.Fields(0)
rs.MoveNext()

hth
Roger
"Patrick" <pa****************@siemens.com> wrote in message
news:9f**************************@posting.google.c om...
Hi,

I managed to open a msaccess database with python.

import win32com.client.dynamic
db1 = win32com.client.dynamic.Dispatch("Access.Applicati on")
dbname = "D:\\Project\\Database\\database.mdb"
db1.OpenCurrentDatabase(dbname)

Now, I have the problem, that I don't know how I can read the lines
of my table. Can somebody help me please and give me an example code ?

I'm looking forward to your answers, and thank u very much in advance.

Cheers

Patrick

Jul 18 '05 #2
pa****************@siemens.com (Patrick) writes:
import win32com.client.dynamic
db1 = win32com.client.dynamic.Dispatch("Access.Applicati on")


As an aside: This looks like a good candidate for import aliasing

import win32com.client.dynamic as com
db1 = com.Dispatch("Access.Application")

Unless you like to type a lot. :)
Jul 18 '05 #3
pa****************@siemens.com (Patrick) wrote in message news:<9f**************************@posting.google. com>...
Hi,

I managed to open a msaccess database with python.


You can help us by using an informative title such as "Open MSAccess
with Python?" instead of the generic "Can somebody help me?"
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RC | last post by:
Hi, somebody know how is possible to open a popup on clients browser that are visiting my page? I need to open a popup within a message into browser of xxx client that is on xxx page. Like a...
0
by: R. Tarazi | last post by:
Hello together, I'm having extreme difficulties using RegExps for a specific problem and would really appreciate any help and hope somebody will read through my "long" posting... 1. <?php...
2
by: martijn | last post by:
Hi There, my vb app can open files. Well, actually my vb app launches word or excell to open them. These files are shared in a network. If somebody else has allready opened that file, you...
4
by: John Dean | last post by:
Hi I have been reading quite a lot of Python source code recently and I have come across a particular construct which I don't understand. I would be grateful if somebody could explain the reason...
0
by: John Dean | last post by:
Hi I am in the process of porting Rekall to Mac X OS and I am having trouble finding the Python SDK. I would be grateful if somebody would be kind enough to point me in the right direction ...
6
by: lostinspace | last post by:
After four+ years of using FrontPage in a limited capacity and having created over 600 pages on my sites, I've finally (at least for the most part) abandoned FP, to begin the process of converting...
3
by: lagu2653 via DotNetMonster.com | last post by:
I have a log-in window application. When the user presses the cancel button it kills another window by it's name and then it exits. The problem is that if somebody kills the log-in window by...
5
by: Sunfire | last post by:
Can somebody put this code into c#? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim imageFolder As String Dim imageText As String Dim bm As...
9
by: ahilar12 | last post by:
1. <head> 2. <script type="text/javascript"> 3. </script> 4. </head> 5. <body> 6. <form> 7. <select name="team" id="mylist" > 8. <option></option> 9....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.