> > > > > > John, > > > > > > SQLite is *very* different from other SQL databases in that it uses > > > manifest typing > > > (see http://sqlite.org/different.html) which can cause the effects you > > > have been observing; > > > I would assume that Dabo takes whatever SQLite reports as data type > > > for fields and it goes from there. > > > > > > Cheers, > > > Kai > > > > From what I have been reading I would agree. However, in this case the > > datatype actually changes. And the fact that it changes is dependent on > > the contents of the first record in the dataset I'm working with. If the > > first record contains a Null the Dabo routine returns a text (string) - > > if it's a date it returns dates. > > By default Sqlite treats all fields as strings. The presence of a Null > seems to invoke the default behavior. You might want to give it a hint. > So something like: > > first record > mustenrollby = Null ::date > referral = '2011-04-10'::date > > > This was completely unexpected and I believe it's a Dabo bug. I'm not > > sure how to fix it but it needs fixing. > > > > Johnf
I have tried to do exactly that without success. Also you can not "ALTER Column". The way I discovered the issue came from the fact I needed to combine different Postgres database data (IOW's not in the same domain). So I decided to use two different connections (very cool feature of Dabo) and combine the information using datasets. When I do a join of the datasets to produce a new dataset the datatypes of the fields can change due to the presents of a null in the field in the first record. This came as a surprise. So I have two datasets and the datatypes for the fields are correct - combine them using a join and the datatypes get changed. Paul has discovered the cause - Dabo creates a new in memory table to store the data for the join (other actions cause the same thing). In the Dabo routine dDataSet the routine must determine the datatype of each field - to create the table. The way the Dabo routine makes that determination depends on the first record. If by chance the field contains a Null the datatype becomes text. If the data is a date then the datatype becomes a date. I'm not talking about how the data is stored - I realize the data is stored as a string in either case. I don't see how it can be fixed. If the routine requires that a record be used to determine datatype then we are stuck with the results. Even if you had the routine check 100 records they all could be null and the 101 record contain a date. I didn't find any information_schema function for sqlite. And the suggestion on PRAGMA Paul said would not work. Johnf _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
