Does DA check for the MDAC version at all?

turns out there was a database server issue I wasn’t aware of. give me a few minutes and i’ll run a valid test this morning…

OK, disregard my comments from earlier about SM not working. this was due to some issues and updates going on with the db server that I was using and I wasn’t made aware of.

Changing the connection string as you initially suggested now works and I see all the tables. I will move forward and see if I can generate a full schema.

Thanks, and apologies for the false information earlier.

alan

Glad that this has been sorted out.

I’ll log an issue to add the Pervasive connection profile into the main .daConfig file.

Thanks, logged as bugs://81044

Ok, an update. I’m getting all the table names now but no field level data for building a scheme. Any ideas why?

Good question. Let’s find this out.

So when you drag a table name into the Tables list - a Schema table w/o fields is created, am I right?

In the connection tester comment all code between connection.Open() and connection.Close() and add there this code:

				var tables = connection.GetTableNames();
				var tableName = tables[0];
				var fields = connection.GetTableFields(tableName, true, null);

				Console.WriteLine("Fields loaded: " + fields.Count);

This code mimics the one used to retrieve fields list

Also add this as the first line of the Main method:

		AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;

and add this method to the Program class:

	private static void CurrentDomain_FirstChanceException(object sender, System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs e)
	{
		Console.WriteLine("************************************************");
		Console.WriteLine("FirstChanceException:");
		Console.WriteLine(e.Exception.ToString());
		Console.WriteLine("------------------------------------------------");
	}

This code will reveal all exceptions (even if they are suppressed)

does this make any sense?

C:\alan>connectiontester
************************************************
FirstChanceException:
System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToBoolean(IFormatProvider provider)
------------------------------------------------
System.InvalidCastException: Object cannot be cast from DBNull to other types.
   at System.DBNull.System.IConvertible.ToBoolean(IFormatProvider provider)
   at System.Convert.ToBoolean(Object value)
   at RemObjects.DataAbstract.Server.BaseConnection.GetTableFields(String tableText, Boolean isTableNameProvided, SchemaParameterCollection parameters) in c:\CI\b\rofx\917\Data Abstract for .NET\Source\RemObjects.DataAbstract.Server\ConnectionManager\BaseConnection.pas:line 740
   at ConnectionTester.Program.Main(String[] args) in D:\dev\ROTest\ConnectionTester\Program.cs:line 67

which is this line in my code

var fields = connection.GetTableFields(tableName, true, null);

Yes, it does. For some reason ADO.NET driver reports a NULL value in a column expected to have only true or false values. This causes a crash in the method so the field info is not retrieved. I’ll add checks for all fields that are used to retrieve schema to better adapt for such cases.

Thanks, logged as bugs://81053

how involved is this? Any chance I could get a new version yet today to test further?

bugs://81053 got closed with status fixed.

Not sure. The full build process takes some (rather long) time.

Is there a new build ready for me to test out???

It just finished. It should be available on https://www.remobjects.com/portal/downloads/personal.aspx in a few.

Please do not forget to backup the DataAbstract.daConfig your file - I haven’t merged Pervasive driver definition yet (that will be done once everything is working).

Thanks Anton -

this works much better. Field definitions are now being retrieved properly, but there is one more issue. I have a lot of tables in my database, some are new, some are old, and there are a couple where the actual physical file for the table is missing. This could be for several reasons - i’m using a test server now, and not all files were copied since some are no longer used, etc. in the new Schema wizard, i’m getting the following exception:

Could this situation be addressed also? Still finish creating schema even if db table file is not found?

Thanks, logged as bugs://81068

I’ve logged this to add skipping tables to the Schema Modeler.
For now I’ll create a simple command-line utility for you that will import tables into a Schema. ETA for this is around 1 hour.

Here is the project: SchemaLoader.zip (4.7 KB)

You’ll need to add your modified .daConfig file as a resource and to change the connection line and destination file name.

Thanks Anton -

I gave it a try but one older bug seems to have reappeared. Take a look at this screenshot:

Hmm. Odd. Does the Schema Modeler fail with the same error?

If not then please double-check that this little app does reference proper assemblies (ie the latest ones, with version # ending with .1384) and that these assemblies are deployed together with the app if you are running it on a different host.