[python-win32] ADOX catalog.Table.Append error -- 'The parameter is

Jim Vickroy Jim.Vickroy at noaa.gov
Wed Jul 12 16:39:51 CEST 2006


Roger Upole wrote:

>Jim.Vickroy wrote:
>  
>
>>Hello,
>>
>>I am a novice user of ADOX who is attempting to create a database and 
>>a table in it.
>>
>>I seem to be able to create a SQL Express database but am unable to 
>>add a table to it.
>>
>>The attached script (adox.py) illustrates the difficulty.
>>
>>Any suggestions would be appreciated.
>>    
>>
>
>I think Sql Server requires that you create the table before
>adding any keys. Try moving the table.Keys.Append
>to after catalog.Tables.Append.
>
>     Roger
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32
>  
>
Thank-you, Roger!  You are correct.  I was slowly being forced to the 
same conclusion, but you saved me considerable time trying permutations.

I started by getting an Access script to work and then naively assumed 
all I had to do was change the connection string, but that was wrong.

In case anyone is interested, I have attached a working example of  how 
to create a SQL Express database with one table comprising two columns 
-- one of which is designated as the primary key.

Thanks again to all who offered suggestions.

-- jv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20060712/5e9039d7/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqlexpress.py
Type: application/x-python
Size: 1779 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-win32/attachments/20060712/5e9039d7/attachment.bin 


More information about the Python-win32 mailing list