Hi Tomaz, > On 11 Oct 2019, at 18:15, eftomi <tomaz.t...@ef.uni-lj.si> wrote: > > Dear all, > > I'm working on ADO database driver for Glorp by using Pablo's PharoCOM. The > structure of the driver is similar to Sven's P3DatabaseDriver and P3Client > (thanks, Sven for very clear architecture :-) ) and the work is progressing > quite nicely. I can connect to SQL Server, PostgreSQL and create tables, > insert and read data directly with ADO Connection and Recordset objects, and > with Glorp, too. In next days I'll do some more testing, including Oracle, > and publish the prototype on GitHub. The goal is not PostgreSQL, of course, > but to finally reach SQL Server, Oracle and possibly MS Access, at least > from Windows systems.
Great to hear this, please keep us all posted of your progress. > One thing is bothering me though - SQL Server supports Unicode with NCHAR > and NVARCHAR types, and when using INSERT INTO with literal strings these > should be prefixed with N, like in > > N'This is a Unicode string' > > Does somebody remember whether Glorp can prefix the strings in that way when > constructing SQL statements? I checked all the constants and string > conversions under DatabasePlatform but haven't found anything related to > this kind of prefixing. I don't know for sure. Could you not add the N at the moment the string quotes are written ? What I do know is this: the interface between P3DatabaseDriver and P3Client is essentially an SQL string to execute. That SQL string was built by the Glorp machinery, so it must know about certain specifics (like string quoting and escaping, etc). Also, in Glorp's Login #database specification, a platform is set, like PostgreSQLPlatform. So I am assuming some platform specific delegation is happening (or could happen). I don't have a Glorp image ready, but there must be a way to find this out. That being said, I do foresee a problem for you. You are building a more general driver that can access several different platforms, you will need to make that explicit, else you won't be able to do something specific for SQL Server. HTH, Sven > Thanks and best wishes, > Tomaz > > > > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html >