473,387 Members | 1,542 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,387 software developers and data experts.

[adodbapi] cannot create table

I cannot create table using adodbapi.
I have no problem with SELECT etc.

But I can create table using win32com.client directly.
I don't know why.

Could you give some advice, please?

This is my source.
=====================================
from adodbapi import adodbapi

DSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=test.mdb;'
stdconn = adodbapi.connect(DSN)
cur = stdconn.cursor()

query = """
CREATE TABLE table01 (
id COUNTER(1, 1) PRIMARY KEY,
name VARCHAR(255) NOT NULL DEFAULT "",
comment VARCHAR(255) NOT NULL DEFAULT ""
)"""

# api
cur.execute(query)
cur.close()
stdconn.close()
======================================
Jul 18 '05 #1
1 2956
At 10:48 PM 10/5/2003, Sangbae wrote:
I cannot create table using adodbapi.
<gripe on>
I have the same problem especially with Microsoft messages: "Cannot do blah
blah". No hint as to what the problem is.
<gripe off>

PLEASE tell us what the symptom is. Error message, no error message but
also no new table, or what?
I have no problem with SELECT etc.

But I can create table using win32com.client directly.
I don't know why.

Could you give some advice, please?

This is my source.
=====================================
from adodbapi import adodbapi

DSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=test.mdb;'
stdconn = adodbapi.connect(DSN)
cur = stdconn.cursor()

query = """
CREATE TABLE table01 (
id COUNTER(1, 1) PRIMARY KEY,
name VARCHAR(255) NOT NULL DEFAULT "",
comment VARCHAR(255) NOT NULL DEFAULT ""
)"""

# api
cur.execute(query)
cur.close()
stdconn.close()
======================================
--
http://mail.python.org/mailman/listinfo/python-list
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003


Bob Gailer
bg*****@alum.rpi.edu
303 442 2625
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003

Jul 18 '05 #2

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

Similar topics

10
by: Achim Domma | last post by:
Hi, I read a webpage via urllib2. The result of the 'read' call is of type 'str'. This string can be written to disc via file('out.html','w').write(html). Then I write the string into a...
0
by: Raaijmakers, Vincent \(GE Infrastructure\) | last post by:
Hopefully posted on the correct newsgroup. The adodbapi group seems so quit.... I want to distinguish between 1) an error in the sql statement to create a table, and 2) when the sql is...
1
by: Max Ischenko | last post by:
Hi, I'm using adodbapi wrapper arount OLEDB driver and I got this error when calling adodbapi.connect(): (-2147221008, 'CoInitialize has not been called.', None, None) The weird part is that...
0
by: Max Ischenko | last post by:
I'm using adodbapi DBAPI module to access SQL server and trying to pass a GUID parameter with an SQL statement. But it doesn't work: I got "incorrect cast expression" from the ADO. If I paste GUID...
4
by: nightmarch | last post by:
I want use crsr.nextset() , But I got errors like following: >>> connStr = "Provider=MSDAORA.1;Password=jmpower;User ID=jmpower;Data Source=jmgis_agps3;Persist Security Info=True" >>> import...
1
by: Nikolai Kirsebom | last post by:
I'm trying to use the adodbapi module, but run into the following problem: After initalization (connection, cursor) I have the following call to a stored procedure (SQL Server, using SQLOLEDB.1...
0
by: Golawala, Moiz M (GE Infrastructure) | last post by:
Hi All, I am having problem returning values from a Stored Procedure that creates a dynamic table (table variable) inserts values during a procedure and then I select from that dynamic table to...
0
by: Golawala, Moiz M (GE Infrastructure) | last post by:
Hi All, Could someone please help me with an issue I am having. I am having problem returning values from a Stored Procedure that creates a dynamic table (table variable) inserts values during a...
3
by: leesquare | last post by:
Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.