Re: [IronPython] data binding

2006-07-17 Thread Michael Foord
jeff sacksteder wrote: > Another tutorial opportunity for Michael. > It's on the list, of course I'll have to learn about it first. :-) Luckily I work with some very talented folk... Michael http://www.voidspace.org.uk/python/index.shtml > I have a DataGridView control containing data that needs

Re: [IronPython] data binding

2006-07-17 Thread zeleny
You have to save your my_DA somewhere. > dataConn = OleDbConnection('provider=microsoft.jet.oledb.4.0;data > source=cheeseshop.mdb ;') > cheese_sql = 'select * from cheese' > my_DA = OleDbDataAdapter(cheese_sql,dataConn) > my_DS = DataSet() > my_DA.Fill(my_dsDS,'ds_cheese') > my_BS = Forms.Binding

Re: [IronPython] data binding

2006-07-17 Thread jeff sacksteder
Let me show a more specific example. How does the saveChanges method find a reference to the correct DataAdapter to call Update() upon?dataConn = OleDbConnection('provider=microsoft.jet.oledb.4.0;data source=cheeseshop.mdb ;')cheese_sql = 'select * from cheese'my_DA = OleDbDataAdapter(cheese_sql,da

Re: [IronPython] data binding

2006-07-17 Thread zeleny
> So how do I propagate my changes back, then? Hmm. DataSet dataSet; DataAdapter adapter; // configuring the adapter adapter.Fill (dataSet, "table1"); dataGridView1.DataSource = dataSet; dataGridView1.DataMember = "table1"; // changes to the datagridview adapter.Update (dataSet, "table1"); __

Re: [IronPython] data binding

2006-07-17 Thread jeff sacksteder
So how do I propagate my changes back, then? ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] data binding

2006-07-17 Thread zeleny
> Assuming I have a reference to the specific control, how do I find the > related DataAdapter ? There is no way to find the DataAdapter... just because you can use more than one DataAdapter to fill the DataSet/DataTable, e.g while merging two databases or migrating or smth else. __

[IronPython] data binding

2006-07-17 Thread jeff sacksteder
Another tutorial opportunity for Michael.I have a DataGridView control containing data that needs to be flushed back into the original data source. I believe the following to be true:The DataGridView control is bound to the DataSet Object, which is bound to the DataAdapter, which connects to the Da

Re: [IronPython] Bug in time.strptime?

2006-07-17 Thread Snaury
On 7/17/06, Snaury <[EMAIL PROTECTED]> wrote: > >>> import System > >>> System.Threading.Thread.CurrentThread.CurrentCulture = > System.Globalization.CultureInfo("en-US") Btw, the fact that strptime doesn't use locale from module _locale (and I have to set current culture on my own), is it another

Re: [IronPython] Bug in time.strptime?

2006-07-17 Thread Snaury
Apparently, after I tried to create a patch for this, I suddenly found that not only quoting of user text was the problem. Format for %d also was another problem, it seems it should be %x (otherwise ParseExact is looking for two numbers and fails). --- time.cs.origFri Jul 7 09:02:28 2006

Re: [IronPython] Bug in time.strptime?

2006-07-17 Thread Dino Viehland
Awesome, thanks for the information - I wasn't sure how to deal w/ the unrecognized characters before, that'll save me the search. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Snaury Sent: Monday, July 17, 2006 10:44 AM To: Discussion of IronPython Sub

Re: [IronPython] Bug in time.strptime?

2006-07-17 Thread Snaury
On 7/17/06, Snaury <[EMAIL PROTECTED]> wrote: > Hi Dino, > > It seems that you just need to use DateTime.ParseExact and wrap those > random characters in single quotes and then it parses successfully. At > least I did it in the clr way and it worked: > > import System > System.DateTime.ParseExact("

Re: [IronPython] Bug in time.strptime?

2006-07-17 Thread Snaury
Hi Dino, It seems that you just need to use DateTime.ParseExact and wrap those random characters in single quotes and then it parses successfully. At least I did it in the clr way and it worked: import System System.DateTime.ParseExact("July 3, 2006 At 0724 GMT", " d, y 'At' HHmm 'GMT'", Syst

Re: [IronPython] Cryptic traceback when encoding name is incorrect

2006-07-17 Thread Dino Viehland
Thanks for the report - I've opened CodePlex bug #1019 to track this (http://www.codeplex.com/WorkItem/List.aspx?ProjectName=IronPython). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Snaury Sent: Monday, July 17, 2006 9:21 AM To: Discussion of IronPyth

[IronPython] Cryptic traceback when encoding name is incorrect

2006-07-17 Thread Snaury
# -*- coding: nonsense -*- print "Testing..." Traceback (most recent call last): File mscorlib, line unknown, in .ctor File mscorlib, line unknown, in .ctor TypeError: Value cannot be null. Parameter name: encoding I think it should properly state that encoding name is invalid. __

Re: [IronPython] Function call bug

2006-07-17 Thread Martin Maly
Thank you, Seo, opened as bug 1018 on CodePlex. Hopfully this will be an easy fix. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo Sent: Monday, July 17, 2006 5:42 AM To: Discussion of IronPython Subject: [IronPython] Function call bug I am

[IronPython] Function call bug

2006-07-17 Thread Sanghyeon Seo
I am very surprised to find this. # test.py def f(a, *b): print a f(1, *[2]) Seo Sanghyeon ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com