sqlite_port.htm 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536
  1. <html xmlns:v="urn:schemas-microsoft-com:vml"
  2. xmlns:o="urn:schemas-microsoft-com:office:office"
  3. xmlns:w="urn:schemas-microsoft-com:office:word"
  4. xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
  5. xmlns="http://www.w3.org/TR/REC-html40">
  6. <head>
  7. <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  8. <meta name=ProgId content=Word.Document>
  9. <meta name=Generator content="Microsoft Word 12">
  10. <meta name=Originator content="Microsoft Word 12">
  11. <link rel=File-List href="sqlite_port-Dateien/filelist.xml">
  12. <link rel=Edit-Time-Data href="sqlite_port-Dateien/editdata.mso">
  13. <!--[if !mso]>
  14. <style>
  15. v\:* {behavior:url(#default#VML);}
  16. o\:* {behavior:url(#default#VML);}
  17. w\:* {behavior:url(#default#VML);}
  18. .shape {behavior:url(#default#VML);}
  19. </style>
  20. <![endif]--><!--[if gte mso 9]><xml>
  21. <o:DocumentProperties>
  22. <o:Author>SieMatic</o:Author>
  23. <o:LastAuthor>SieMatic</o:LastAuthor>
  24. <o:Revision>2</o:Revision>
  25. <o:Created>2008-02-26T10:24:00Z</o:Created>
  26. <o:LastSaved>2008-02-26T10:24:00Z</o:LastSaved>
  27. <o:Pages>7</o:Pages>
  28. <o:Words>2063</o:Words>
  29. <o:Characters>13003</o:Characters>
  30. <o:Company>SieMatic Möbelwerke GmbH</o:Company>
  31. <o:Lines>108</o:Lines>
  32. <o:Paragraphs>30</o:Paragraphs>
  33. <o:CharactersWithSpaces>15036</o:CharactersWithSpaces>
  34. <o:Version>12.00</o:Version>
  35. </o:DocumentProperties>
  36. </xml><![endif]-->
  37. <link rel=themeData href="sqlite_port-Dateien/themedata.thmx">
  38. <link rel=colorSchemeMapping href="sqlite_port-Dateien/colorschememapping.xml">
  39. <!--[if gte mso 9]><xml>
  40. <w:WordDocument>
  41. <w:GrammarState>Clean</w:GrammarState>
  42. <w:TrackMoves>false</w:TrackMoves>
  43. <w:TrackFormatting/>
  44. <w:HyphenationZone>21</w:HyphenationZone>
  45. <w:PunctuationKerning/>
  46. <w:ValidateAgainstSchemas/>
  47. <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  48. <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  49. <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  50. <w:DoNotPromoteQF/>
  51. <w:LidThemeOther>DE</w:LidThemeOther>
  52. <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
  53. <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  54. <w:Compatibility>
  55. <w:BreakWrappedTables/>
  56. <w:SnapToGridInCell/>
  57. <w:WrapTextWithPunct/>
  58. <w:UseAsianBreakRules/>
  59. <w:DontGrowAutofit/>
  60. <w:DontUseIndentAsNumberingTabStop/>
  61. <w:FELineBreak11/>
  62. <w:WW11IndentRules/>
  63. <w:DontAutofitConstrainedTables/>
  64. <w:AutofitLikeWW11/>
  65. <w:HangulWidthLikeWW11/>
  66. <w:UseNormalStyleForList/>
  67. </w:Compatibility>
  68. <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
  69. <m:mathPr>
  70. <m:mathFont m:val="Cambria Math"/>
  71. <m:brkBin m:val="before"/>
  72. <m:brkBinSub m:val="&#45;-"/>
  73. <m:smallFrac m:val="off"/>
  74. <m:dispDef/>
  75. <m:lMargin m:val="0"/>
  76. <m:rMargin m:val="0"/>
  77. <m:defJc m:val="centerGroup"/>
  78. <m:wrapIndent m:val="1440"/>
  79. <m:intLim m:val="subSup"/>
  80. <m:naryLim m:val="undOvr"/>
  81. </m:mathPr></w:WordDocument>
  82. </xml><![endif]--><!--[if gte mso 9]><xml>
  83. <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  84. DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  85. LatentStyleCount="267">
  86. <w:LsdException Locked="false" Priority="0" SemiHidden="false"
  87. UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  88. <w:LsdException Locked="false" Priority="9" SemiHidden="false"
  89. UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  90. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  91. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  92. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  93. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  94. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  95. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  96. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  97. <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  98. <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  99. <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  100. <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  101. <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  102. <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  103. <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  104. <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  105. <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  106. <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  107. <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  108. <w:LsdException Locked="false" Priority="10" SemiHidden="false"
  109. UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  110. <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  111. <w:LsdException Locked="false" Priority="11" SemiHidden="false"
  112. UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  113. <w:LsdException Locked="false" Priority="22" SemiHidden="false"
  114. UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  115. <w:LsdException Locked="false" Priority="20" SemiHidden="false"
  116. UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  117. <w:LsdException Locked="false" Priority="59" SemiHidden="false"
  118. UnhideWhenUsed="false" Name="Table Grid"/>
  119. <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  120. <w:LsdException Locked="false" Priority="1" SemiHidden="false"
  121. UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  122. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  123. UnhideWhenUsed="false" Name="Light Shading"/>
  124. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  125. UnhideWhenUsed="false" Name="Light List"/>
  126. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  127. UnhideWhenUsed="false" Name="Light Grid"/>
  128. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  129. UnhideWhenUsed="false" Name="Medium Shading 1"/>
  130. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  131. UnhideWhenUsed="false" Name="Medium Shading 2"/>
  132. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  133. UnhideWhenUsed="false" Name="Medium List 1"/>
  134. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  135. UnhideWhenUsed="false" Name="Medium List 2"/>
  136. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  137. UnhideWhenUsed="false" Name="Medium Grid 1"/>
  138. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  139. UnhideWhenUsed="false" Name="Medium Grid 2"/>
  140. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  141. UnhideWhenUsed="false" Name="Medium Grid 3"/>
  142. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  143. UnhideWhenUsed="false" Name="Dark List"/>
  144. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  145. UnhideWhenUsed="false" Name="Colorful Shading"/>
  146. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  147. UnhideWhenUsed="false" Name="Colorful List"/>
  148. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  149. UnhideWhenUsed="false" Name="Colorful Grid"/>
  150. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  151. UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  152. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  153. UnhideWhenUsed="false" Name="Light List Accent 1"/>
  154. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  155. UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  156. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  157. UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  158. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  159. UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  160. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  161. UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  162. <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  163. <w:LsdException Locked="false" Priority="34" SemiHidden="false"
  164. UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  165. <w:LsdException Locked="false" Priority="29" SemiHidden="false"
  166. UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  167. <w:LsdException Locked="false" Priority="30" SemiHidden="false"
  168. UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  169. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  170. UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  171. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  172. UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  173. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  174. UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  175. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  176. UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  177. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  178. UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  179. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  180. UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  181. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  182. UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  183. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  184. UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  185. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  186. UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  187. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  188. UnhideWhenUsed="false" Name="Light List Accent 2"/>
  189. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  190. UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  191. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  192. UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  193. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  194. UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  195. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  196. UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  197. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  198. UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  199. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  200. UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  201. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  202. UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  203. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  204. UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  205. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  206. UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  207. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  208. UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  209. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  210. UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  211. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  212. UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  213. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  214. UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  215. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  216. UnhideWhenUsed="false" Name="Light List Accent 3"/>
  217. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  218. UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  219. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  220. UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  221. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  222. UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  223. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  224. UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  225. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  226. UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  227. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  228. UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  229. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  230. UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  231. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  232. UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  233. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  234. UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  235. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  236. UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  237. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  238. UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  239. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  240. UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  241. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  242. UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  243. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  244. UnhideWhenUsed="false" Name="Light List Accent 4"/>
  245. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  246. UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  247. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  248. UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  249. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  250. UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  251. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  252. UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  253. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  254. UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  255. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  256. UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  257. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  258. UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  259. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  260. UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  261. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  262. UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  263. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  264. UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  265. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  266. UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  267. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  268. UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  269. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  270. UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  271. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  272. UnhideWhenUsed="false" Name="Light List Accent 5"/>
  273. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  274. UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  275. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  276. UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  277. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  278. UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  279. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  280. UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  281. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  282. UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  283. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  284. UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  285. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  286. UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  287. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  288. UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  289. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  290. UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  291. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  292. UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  293. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  294. UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  295. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  296. UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  297. <w:LsdException Locked="false" Priority="60" SemiHidden="false"
  298. UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  299. <w:LsdException Locked="false" Priority="61" SemiHidden="false"
  300. UnhideWhenUsed="false" Name="Light List Accent 6"/>
  301. <w:LsdException Locked="false" Priority="62" SemiHidden="false"
  302. UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  303. <w:LsdException Locked="false" Priority="63" SemiHidden="false"
  304. UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  305. <w:LsdException Locked="false" Priority="64" SemiHidden="false"
  306. UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  307. <w:LsdException Locked="false" Priority="65" SemiHidden="false"
  308. UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  309. <w:LsdException Locked="false" Priority="66" SemiHidden="false"
  310. UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  311. <w:LsdException Locked="false" Priority="67" SemiHidden="false"
  312. UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  313. <w:LsdException Locked="false" Priority="68" SemiHidden="false"
  314. UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  315. <w:LsdException Locked="false" Priority="69" SemiHidden="false"
  316. UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  317. <w:LsdException Locked="false" Priority="70" SemiHidden="false"
  318. UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  319. <w:LsdException Locked="false" Priority="71" SemiHidden="false"
  320. UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  321. <w:LsdException Locked="false" Priority="72" SemiHidden="false"
  322. UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  323. <w:LsdException Locked="false" Priority="73" SemiHidden="false"
  324. UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  325. <w:LsdException Locked="false" Priority="19" SemiHidden="false"
  326. UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  327. <w:LsdException Locked="false" Priority="21" SemiHidden="false"
  328. UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  329. <w:LsdException Locked="false" Priority="31" SemiHidden="false"
  330. UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  331. <w:LsdException Locked="false" Priority="32" SemiHidden="false"
  332. UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  333. <w:LsdException Locked="false" Priority="33" SemiHidden="false"
  334. UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  335. <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  336. <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
  337. </w:LatentStyles>
  338. </xml><![endif]-->
  339. <style>
  340. <!--
  341. /* Font Definitions */
  342. @font-face
  343. {font-family:Wingdings;
  344. panose-1:5 0 0 0 0 0 0 0 0 0;
  345. mso-font-charset:2;
  346. mso-generic-font-family:auto;
  347. mso-font-pitch:variable;
  348. mso-font-signature:0 268435456 0 0 -2147483648 0;}
  349. @font-face
  350. {font-family:"Cambria Math";
  351. panose-1:2 4 5 3 5 4 6 3 2 4;
  352. mso-font-charset:0;
  353. mso-generic-font-family:roman;
  354. mso-font-pitch:variable;
  355. mso-font-signature:-1610611985 1107304683 0 0 159 0;}
  356. @font-face
  357. {font-family:Calibri;
  358. panose-1:2 15 5 2 2 2 4 3 2 4;
  359. mso-font-charset:0;
  360. mso-generic-font-family:swiss;
  361. mso-font-pitch:variable;
  362. mso-font-signature:-1610611985 1073750139 0 0 159 0;}
  363. @font-face
  364. {font-family:Tahoma;
  365. panose-1:2 11 6 4 3 5 4 4 2 4;
  366. mso-font-charset:0;
  367. mso-generic-font-family:swiss;
  368. mso-font-pitch:variable;
  369. mso-font-signature:1627400839 -2147483648 8 0 66047 0;}
  370. /* Style Definitions */
  371. p.MsoNormal, li.MsoNormal, div.MsoNormal
  372. {mso-style-unhide:no;
  373. mso-style-qformat:yes;
  374. mso-style-parent:"";
  375. margin-top:0cm;
  376. margin-right:0cm;
  377. margin-bottom:10.0pt;
  378. margin-left:0cm;
  379. line-height:115%;
  380. mso-pagination:widow-orphan;
  381. font-size:11.0pt;
  382. font-family:"Calibri","sans-serif";
  383. mso-fareast-font-family:Calibri;
  384. mso-bidi-font-family:"Times New Roman";
  385. mso-fareast-language:EN-US;}
  386. p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
  387. {mso-style-noshow:yes;
  388. mso-style-priority:99;
  389. mso-style-link:"Kommentartext Zchn";
  390. margin-top:0cm;
  391. margin-right:0cm;
  392. margin-bottom:10.0pt;
  393. margin-left:0cm;
  394. line-height:115%;
  395. mso-pagination:widow-orphan;
  396. font-size:10.0pt;
  397. font-family:"Calibri","sans-serif";
  398. mso-fareast-font-family:Calibri;
  399. mso-bidi-font-family:"Times New Roman";
  400. mso-fareast-language:EN-US;}
  401. span.MsoCommentReference
  402. {mso-style-noshow:yes;
  403. mso-style-priority:99;
  404. mso-ansi-font-size:8.0pt;
  405. mso-bidi-font-size:8.0pt;}
  406. a:link, span.MsoHyperlink
  407. {mso-style-priority:99;
  408. color:blue;
  409. text-decoration:underline;
  410. text-underline:single;}
  411. a:visited, span.MsoHyperlinkFollowed
  412. {mso-style-noshow:yes;
  413. mso-style-priority:99;
  414. color:purple;
  415. text-decoration:underline;
  416. text-underline:single;}
  417. p
  418. {mso-style-noshow:yes;
  419. mso-style-priority:99;
  420. mso-margin-top-alt:auto;
  421. margin-right:0cm;
  422. mso-margin-bottom-alt:auto;
  423. margin-left:0cm;
  424. mso-pagination:widow-orphan;
  425. font-size:12.0pt;
  426. font-family:"Times New Roman","serif";
  427. mso-fareast-font-family:"Times New Roman";}
  428. code
  429. {mso-style-noshow:yes;
  430. mso-style-priority:99;
  431. font-family:"Courier New";
  432. mso-ascii-font-family:"Courier New";
  433. mso-fareast-font-family:"Times New Roman";
  434. mso-hansi-font-family:"Courier New";
  435. mso-bidi-font-family:"Courier New";}
  436. pre
  437. {mso-style-priority:99;
  438. mso-style-link:"HTML Vorformatiert Zchn";
  439. margin:0cm;
  440. margin-bottom:.0001pt;
  441. mso-pagination:widow-orphan;
  442. tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
  443. font-size:12.0pt;
  444. font-family:"Courier New";
  445. mso-fareast-font-family:"Times New Roman";
  446. color:black;}
  447. p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
  448. {mso-style-noshow:yes;
  449. mso-style-priority:99;
  450. mso-style-parent:Kommentartext;
  451. mso-style-link:"Kommentarthema Zchn";
  452. mso-style-next:Kommentartext;
  453. margin-top:0cm;
  454. margin-right:0cm;
  455. margin-bottom:10.0pt;
  456. margin-left:0cm;
  457. line-height:115%;
  458. mso-pagination:widow-orphan;
  459. font-size:10.0pt;
  460. font-family:"Calibri","sans-serif";
  461. mso-fareast-font-family:Calibri;
  462. mso-bidi-font-family:"Times New Roman";
  463. mso-fareast-language:EN-US;
  464. font-weight:bold;}
  465. p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
  466. {mso-style-noshow:yes;
  467. mso-style-priority:99;
  468. mso-style-link:"Sprechblasentext Zchn";
  469. margin:0cm;
  470. margin-bottom:.0001pt;
  471. mso-pagination:widow-orphan;
  472. font-size:8.0pt;
  473. font-family:"Tahoma","sans-serif";
  474. mso-fareast-font-family:Calibri;
  475. mso-fareast-language:EN-US;}
  476. p.codeblock, li.codeblock, div.codeblock
  477. {mso-style-name:codeblock;
  478. mso-style-unhide:no;
  479. mso-margin-top-alt:auto;
  480. margin-right:0cm;
  481. mso-margin-bottom-alt:auto;
  482. margin-left:0cm;
  483. mso-pagination:widow-orphan;
  484. font-size:12.0pt;
  485. font-family:"Times New Roman","serif";
  486. mso-fareast-font-family:"Times New Roman";}
  487. span.HTMLVorformatiertZchn
  488. {mso-style-name:"HTML Vorformatiert Zchn";
  489. mso-style-priority:99;
  490. mso-style-unhide:no;
  491. mso-style-locked:yes;
  492. mso-style-link:"HTML Vorformatiert";
  493. mso-ansi-font-size:12.0pt;
  494. mso-bidi-font-size:12.0pt;
  495. font-family:"Courier New";
  496. mso-ascii-font-family:"Courier New";
  497. mso-fareast-font-family:"Times New Roman";
  498. mso-hansi-font-family:"Courier New";
  499. mso-bidi-font-family:"Courier New";
  500. color:black;}
  501. span.KommentartextZchn
  502. {mso-style-name:"Kommentartext Zchn";
  503. mso-style-noshow:yes;
  504. mso-style-priority:99;
  505. mso-style-unhide:no;
  506. mso-style-locked:yes;
  507. mso-style-link:Kommentartext;
  508. mso-ansi-language:DE;}
  509. span.KommentarthemaZchn
  510. {mso-style-name:"Kommentarthema Zchn";
  511. mso-style-noshow:yes;
  512. mso-style-priority:99;
  513. mso-style-unhide:no;
  514. mso-style-locked:yes;
  515. mso-style-parent:"Kommentartext Zchn";
  516. mso-style-link:Kommentarthema;
  517. mso-ansi-language:DE;
  518. font-weight:bold;}
  519. span.SprechblasentextZchn
  520. {mso-style-name:"Sprechblasentext Zchn";
  521. mso-style-noshow:yes;
  522. mso-style-priority:99;
  523. mso-style-unhide:no;
  524. mso-style-locked:yes;
  525. mso-style-link:Sprechblasentext;
  526. mso-ansi-font-size:8.0pt;
  527. mso-bidi-font-size:8.0pt;
  528. font-family:"Tahoma","sans-serif";
  529. mso-ascii-font-family:Tahoma;
  530. mso-hansi-font-family:Tahoma;
  531. mso-bidi-font-family:Tahoma;
  532. mso-ansi-language:DE;}
  533. span.GramE
  534. {mso-style-name:"";
  535. mso-gram-e:yes;}
  536. .MsoChpDefault
  537. {mso-style-type:export-only;
  538. mso-default-props:yes;
  539. mso-ascii-font-family:Calibri;
  540. mso-fareast-font-family:Calibri;
  541. mso-hansi-font-family:Calibri;}
  542. @page Section1
  543. {size:595.3pt 841.9pt;
  544. margin:70.85pt 70.85pt 2.0cm 70.85pt;
  545. mso-header-margin:35.4pt;
  546. mso-footer-margin:35.4pt;
  547. mso-paper-source:0;}
  548. div.Section1
  549. {page:Section1;}
  550. /* List Definitions */
  551. @list l0
  552. {mso-list-id:711465342;
  553. mso-list-type:hybrid;
  554. mso-list-template-ids:-398029370 -1506878708 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
  555. @list l0:level1
  556. {mso-level-start-at:0;
  557. mso-level-number-format:bullet;
  558. mso-level-text:\F0D8;
  559. mso-level-tab-stop:none;
  560. mso-level-number-position:left;
  561. text-indent:-18.0pt;
  562. font-family:Wingdings;
  563. mso-fareast-font-family:"Times New Roman";
  564. mso-bidi-font-family:"Courier New";}
  565. @list l1
  566. {mso-list-id:1152210869;
  567. mso-list-type:hybrid;
  568. mso-list-template-ids:1896245118 489165068 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
  569. @list l1:level1
  570. {mso-level-start-at:0;
  571. mso-level-number-format:bullet;
  572. mso-level-text:\F0D8;
  573. mso-level-tab-stop:none;
  574. mso-level-number-position:left;
  575. text-indent:-18.0pt;
  576. font-family:Wingdings;
  577. mso-fareast-font-family:"Times New Roman";
  578. mso-bidi-font-family:"Courier New";}
  579. @list l2
  580. {mso-list-id:2131390884;
  581. mso-list-type:hybrid;
  582. mso-list-template-ids:-835441590 1095827004 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
  583. @list l2:level1
  584. {mso-level-start-at:0;
  585. mso-level-number-format:bullet;
  586. mso-level-text:\F0D8;
  587. mso-level-tab-stop:none;
  588. mso-level-number-position:left;
  589. margin-left:21.4pt;
  590. text-indent:-18.0pt;
  591. font-family:Wingdings;
  592. mso-fareast-font-family:"Times New Roman";
  593. mso-bidi-font-family:"Courier New";}
  594. ol
  595. {margin-bottom:0cm;}
  596. ul
  597. {margin-bottom:0cm;}
  598. -->
  599. </style>
  600. <!--[if gte mso 10]>
  601. <style>
  602. /* Style Definitions */
  603. table.MsoNormalTable
  604. {mso-style-name:"Normale Tabelle";
  605. mso-tstyle-rowband-size:0;
  606. mso-tstyle-colband-size:0;
  607. mso-style-noshow:yes;
  608. mso-style-priority:99;
  609. mso-style-qformat:yes;
  610. mso-style-parent:"";
  611. mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
  612. mso-para-margin:0cm;
  613. mso-para-margin-bottom:.0001pt;
  614. mso-pagination:widow-orphan;
  615. font-size:10.0pt;
  616. font-family:"Calibri","sans-serif";}
  617. </style>
  618. <![endif]--><!--[if gte mso 9]><xml>
  619. <o:shapedefaults v:ext="edit" spidmax="2050"/>
  620. </xml><![endif]--><!--[if gte mso 9]><xml>
  621. <o:shapelayout v:ext="edit">
  622. <o:idmap v:ext="edit" data="1"/>
  623. <o:rules v:ext="edit">
  624. <o:r id="V:Rule4" type="connector" idref="#_x0000_s1033"/>
  625. <o:r id="V:Rule6" type="connector" idref="#_x0000_s1036"/>
  626. </o:rules>
  627. </o:shapelayout></xml><![endif]-->
  628. </head>
  629. <body lang=DE link=blue vlink=purple style='tab-interval:35.4pt'>
  630. <div class=Section1>
  631. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  632. style='mso-ansi-language:EN-US'>SQLite implementation for Symbian OS with an ADO.NET
  633. Provider for Red Five Labs’ .NET Compact Framework 1.0<o:p></o:p></span></b></p>
  634. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  635. style='mso-ansi-language:EN-US'>Converting SQLite to S60<o:p></o:p></span></b></p>
  636. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Red Five Labs’
  637. Net60, a .NET Compact Framework Version 1.0, introduces .NET programming to the
  638. great family of Symbian S60 smartphones. Now it is possible to run a managed .NET
  639. application, written for Windows Mobile, on S60 smartphones. Unfortunately,
  640. however, the .NET Compact Framework 1.0 does not provide any form of database
  641. support. This is first supported in the .NET Compact Framework 2.0 together
  642. with the SQL Server Compact Edition. This SQL Server only runs on Windows
  643. Mobile <span class=GramE>devices which means</span> another database system is
  644. needed to provide database functionality to Symbian devices. Enter SQLite for
  645. S60.<o:p></o:p></span></p>
  646. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>SQLite is a
  647. popular open source, stand-alone database system that was written in C and is
  648. available for Windows, Windows Mobile, OS2 and <span class=GramE>Unix</span> operating
  649. systems. It is ACID compliant and supports the SQL-92 standard. The Symbian OS at
  650. present does not provide a database system, however in the future Symbian OS
  651. Version 9.4 will support a SQLite implementation. <o:p></o:p></span></p>
  652. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  653. style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></b></p>
  654. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  655. style='mso-ansi-language:EN-US'>PIPS for S60 made porting SQLite to Symbian OS
  656. possible<o:p></o:p></span></b></p>
  657. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>At the
  658. beginning of 2007 Symbian published the P.I.P.S. SDK (<a
  659. href="http://developer.symbian.com/wiki/display/oe/P.I.P.S.+Home">http://developer.symbian.com/wiki/display/oe/P.I.P.S.+Home</a>
  660. ) for the S60 and UIQ platforms. P.I.P.S. is the implementation of the POSIX
  661. Interface for Symbian OS that provides C Libraries like STDIO or STDLIB. With
  662. the Open C SDK it is possible to port the SQLite library written in ANSI C to
  663. Symbian OS. To do such a conversion of an existing ANSI C project knowledge of
  664. programming for Symbian OS is needed. A good description of the conversion of
  665. SQLite to S60 is the article on Dr.Dobbs (<a
  666. href="http://www.ddj.com/mobile/198702204?pgno=2">http://www.ddj.com/mobile/198702204?pgno=2</a>)
  667. and describes how such a port of SQLite could be done. By following these
  668. instructions, it was easy to create a project that could compile the C files of
  669. the SQLite project. <o:p></o:p></span></p>
  670. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Note, the
  671. PIPS SDK for S60 must be installed to the PC to compile the SqliteS60 project
  672. whilst the PIPS_s60_1_2_SS .SIS must be installed on the device.<o:p></o:p></span></p>
  673. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  674. style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></b></p>
  675. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  676. style='mso-ansi-language:EN-US'>Converting SQLite .C files to .CPP files<o:p></o:p></span></b></p>
  677. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Before the
  678. SQLite source could be completely compiled, the file IO operations had to be
  679. rewritten. This part of SQLite is not platform independent and uses the native
  680. OS operations to open, read and write files.<span style='mso-spacerun:yes'> 
  681. </span>The first step was to rewrite the file operations with the STDIO
  682. implementation.<span style='mso-spacerun:yes'>  </span>For example the <b
  683. style='mso-bidi-font-weight:normal'>OpenDatabase</b> method was modified to use
  684. the <b style='mso-bidi-font-weight:normal'>fopen</b> method of POSIX. Unfortunately
  685. this did not result in the outcome that was expected. <span
  686. style='mso-spacerun:yes'> </span>On the test device this implementation does
  687. not run. After analyzing this, it seems to be that the ANSI C file IO methods
  688. cause the error. <span style='mso-spacerun:yes'> </span>The Symbian API is an
  689. object oriented programming interface, therefore to use the native file IO <span
  690. class=GramE>classes,</span> the SQLite source must be converted from .C files
  691. to .CPP files. Renaming the files was easy, but after renaming the source files
  692. over 500 compiler errors were output. Most of these were language differences
  693. between C and C++ and could be solved quickly. After resolving these problems,
  694. programming the OS routines with the Symbian file IO classes could begin.<o:p></o:p></span></p>
  695. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>For this
  696. part a new file was created and added to the SQLiteS60 project
  697. (os_symbian.cpp). This file includes all methods that SQLite expects for file
  698. IO. The conversion of the existing C files of the SQLite project to CPP files
  699. makes the SQLiteS60 project very different from the main source. As a result of
  700. this, the implementations for the other OS operations, i.e. for OS2, Windows and
  701. Mac, were deleted from this project. SQLite uses a structure to reference the
  702. correct OS operations and is implemented in every OS implementation. Due to this
  703. practice, only a compiler switch is needed to generate a run-able SQLite library
  704. for the specific operating system. As this structure is not used in the S60
  705. conversion project, it has also been removed from the code and the Symbian IO
  706. methods are directly connected to the OS methods in the file os.cpp.<o:p></o:p></span></p>
  707. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  708. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>A simple
  709. example to open or create a file with native Symbian methods is shown in the
  710. following code snippet.<o:p></o:p></span></p>
  711. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  712. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  713. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  714. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  715. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  716. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US style='font-size:
  717. 7.5pt;line-height:110%;mso-ansi-language:EN-US'>RFs fileSession;<o:p></o:p></span></pre><pre
  718. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  719. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  720. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  721. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>RFile file;<span style='mso-spacerun:yes'>   </span><o:p></o:p></span></pre><pre
  722. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  723. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  724. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  725. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  726. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  727. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  728. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  729. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  730. mso-ansi-language:EN-US'>fileSession.Connect(</span></span><span lang=EN-US
  731. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>);<o:p></o:p></span></pre><pre
  732. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  733. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  734. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  735. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  736. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  737. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  738. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  739. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>TInt err=<span
  740. class=GramE>file.Open(</span>fsSession,fileName,shareMode);<o:p></o:p></span></pre><pre
  741. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  742. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  743. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  744. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  745. mso-ansi-language:EN-US'>if</span></span><span lang=EN-US style='font-size:
  746. 7.5pt;line-height:110%;mso-ansi-language:EN-US'> (err==KErrNotFound) // file does not exist - create it<o:p></o:p></span></pre><pre
  747. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  748. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  749. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  750. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>{<o:p></o:p></span></pre><pre
  751. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  752. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  753. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  754. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>    </span><span
  755. class=GramE>err=</span>file.Create(fsSession,fileName,shareMode);<o:p></o:p></span></pre><pre
  756. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  757. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  758. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  759. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>}<o:p></o:p></span></pre><pre
  760. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  761. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  762. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  763. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  764. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  765. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  766. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  767. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>// do read and write operations<o:p></o:p></span></pre><pre
  768. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  769. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  770. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  771. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  772. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  773. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  774. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  775. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  776. mso-ansi-language:EN-US'>file.Close(</span></span><span lang=EN-US
  777. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>);<o:p></o:p></span></pre><pre
  778. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  779. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  780. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  781. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  782. mso-ansi-language:EN-US'>fileSession.Close(</span></span><span lang=EN-US
  783. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>);<o:p></o:p></span></pre></div>
  784. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  785. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The RFs
  786. class defines the file server session. Any file operation in controlled by an
  787. instance of this class. After this instance is created, the file can be opened
  788. over the RFile class. The RFile class contains all file IO operations. By using
  789. these two classes to extend the <b style='mso-bidi-font-weight:normal'>sqlite3_file</b>
  790. structure, the SQLite file IO operations can use the class instances of RFs and
  791. RFile as shown in the struct below.<o:p></o:p></span></p>
  792. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  793. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  794. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  795. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  796. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  797. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  798. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span class=GramE><span lang=EN-US
  799. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>struct</span></span><span
  800. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'> symbianFile {<o:p></o:p></span></pre><pre
  801. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  802. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  803. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  804. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  805. class=GramE>int</span> isOpen;<o:p></o:p></span></pre><pre style='margin-top:
  806. 3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;
  807. line-height:110%;background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;
  808. padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US
  809. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  810. class=GramE>unsigned</span> char locktype; /* Type of lock currently held on this file */<o:p></o:p></span></pre><pre
  811. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  812. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  813. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  814. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  815. class=GramE>short</span> sharedLockByte;<span style='mso-spacerun:yes'>   </span>/* Randomly chosen byte used as a shared lock */<o:p></o:p></span></pre><pre
  816. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  817. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  818. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  819. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  820. class=GramE>char</span> fileName[512];<o:p></o:p></span></pre><pre
  821. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  822. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  823. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  824. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span>RFs session;<o:p></o:p></span></pre><pre
  825. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  826. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  827. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  828. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span>RFile file;<o:p></o:p></span></pre><pre
  829. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  830. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  831. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  832. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>};<o:p></o:p></span></pre></div>
  833. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  834. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Finally all
  835. the methods that SQLite needs to handle file operations must be rewritten by
  836. using this structure and the RFile methods. The following example shows how to
  837. close an open file and the file server session.<o:p></o:p></span></p>
  838. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  839. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  840. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  841. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  842. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  843. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span class=GramE><span lang=EN-US
  844. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>int</span></span><span
  845. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'> Close(sqlite3_file *id){<o:p></o:p></span></pre><pre
  846. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  847. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  848. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  849. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  850. class=GramE>int</span> rc, cnt = 0;<o:p></o:p></span></pre><pre
  851. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  852. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  853. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  854. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  855. class=GramE>symbianFile</span> *pFile = (symbianFile*)id;<o:p></o:p></span></pre><pre
  856. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  857. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  858. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  859. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  860. class=GramE>pFile</span>-&gt;file.Close();<o:p></o:p></span></pre><pre
  861. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  862. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  863. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  864. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  865. class=GramE>pFile</span>-&gt;session.Close();<o:p></o:p></span></pre><pre
  866. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  867. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  868. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  869. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  870. class=GramE>return</span> SQLITE_OK;<o:p></o:p></span></pre><pre
  871. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  872. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  873. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  874. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>}<o:p></o:p></span></pre></div>
  875. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  876. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The other file
  877. IO operations are similar to the <b style='mso-bidi-font-weight:normal'>close</b>
  878. method. The <b style='mso-bidi-font-weight:normal'>open</b> method of RFile expects
  879. a Unicode string that contains the name of the database file. A conversion of
  880. the ASCII format to Unicode must be done before calling the <b
  881. style='mso-bidi-font-weight:normal'>open</b> method. For such a conversion the <b
  882. style='mso-bidi-font-weight:normal'>CCnvCharacterSetConverter</b> class can be
  883. used. This class needs the file server session handle and the string to convert
  884. to Unicode. The following example shows the converter method used in SQLite.<o:p></o:p></span></p>
  885. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  886. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  887. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  888. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  889. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  890. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  891. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span class=GramE><span lang=EN-US
  892. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>void</span></span><span
  893. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'> ConvertToUnicode(RFs session, TDes16&amp; aUnicode, const char *str)<o:p></o:p></span></pre><pre
  894. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  895. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  896. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  897. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>{<o:p></o:p></span></pre><pre
  898. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  899. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  900. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  901. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span>CCnvCharacterSetConverter *converter = CCnvCharacterSetConverter::<span
  902. class=GramE>NewL(</span>);<o:p></o:p></span></pre><pre style='margin-top:3.4pt;
  903. margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;
  904. line-height:110%;background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;
  905. padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US
  906. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  907. class=GramE>converter</span>-&gt;PrepareToConvertToOrFromL(KCharacterSetIdentifierUtf8, session);<o:p></o:p></span></pre><pre
  908. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  909. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  910. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  911. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><o:p></o:p></span></pre><pre
  912. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  913. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  914. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  915. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span>TPtrC8 <span
  916. class=GramE>ptr(</span>(const unsigned char*)str);<o:p></o:p></span></pre><pre
  917. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  918. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  919. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  920. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  921. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  922. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  923. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  924. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  925. class=GramE>int</span> state = CCnvCharacterSetConverter::KStateDefault;<o:p></o:p></span></pre><pre
  926. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  927. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  928. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  929. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>  </span><span
  930. class=GramE>converter</span>-&gt;ConvertToUnicode(aUnicode, ptr, state);<o:p></o:p></span></pre><pre
  931. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  932. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  933. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  934. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>}<o:p></o:p></span></pre></div>
  935. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  936. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>After
  937. rewriting all operations used by SQLite to use the RFile class, in the os_symbian.cpp
  938. <span class=GramE>file ,</span> the project can be compiled by the Symbian C
  939. compiler (which has been included in the build chain by installing the Carbide
  940. plug in for Visual Studio) and a Symbian Library is created that can be used on
  941. a S60 device as a database. This library takes the form of a native Symbian DLL
  942. called sqlite.dll.<o:p></o:p></span></p>
  943. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The
  944. database file that the sqlite.dll generates can be used by any other
  945. implementation of SQLite. So it will be possible to transfer all stored data
  946. from a smart device to a database server in a company network.<o:p></o:p></span></p>
  947. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  948. style='mso-ansi-language:EN-US'>Compiling sqlite.dll from the SQLiteS60 project<o:p></o:p></span></b></p>
  949. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>It is
  950. possible to compile the sqlite.dll using Visual Studio with the Carbide plugin.
  951. <o:p></o:p></span></p>
  952. <p class=MsoNormal><span class=GramE><span lang=EN-US style='mso-ansi-language:
  953. EN-US'>Another<span style='mso-spacerun:yes'>  </span>easier</span></span><span
  954. lang=EN-US style='mso-ansi-language:EN-US'> possibility is to type the
  955. following command lines in the ‘group’ directory of the SqliteS60 folder.<span
  956. style='mso-spacerun:yes'>  </span><o:p></o:p></span></p>
  957. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>To compile
  958. for the S60 device (GCCE compiler) and as a release version:<b
  959. style='mso-bidi-font-weight:normal'><o:p></o:p></b></span></p>
  960. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  961. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  962. margin-left:0cm;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  963. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  964. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  965. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US style='font-size:
  966. 7.5pt;line-height:110%;mso-ansi-language:EN-US'>&gt; Bldmake bldfiles [enter]<o:p></o:p></span></pre><pre
  967. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  968. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  969. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><b
  970. style='mso-bidi-font-weight:normal'><span lang=EN-US style='font-size:7.5pt;
  971. line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></b></pre><pre
  972. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  973. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  974. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><b
  975. style='mso-bidi-font-weight:normal'><span lang=EN-US style='font-size:7.5pt;
  976. line-height:110%;mso-ansi-language:EN-US'>&gt; <span class=GramE>abld</span> build gcce urel<o:p></o:p></span></b></pre></div>
  977. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  978. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>For the
  979. emulator with debug information:<span style='mso-spacerun:yes'>  </span><o:p></o:p></span></p>
  980. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  981. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  982. margin-left:0cm;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  983. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  984. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  985. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US style='font-size:
  986. 7.5pt;line-height:110%;mso-ansi-language:EN-US'>&gt; Bldmake bldfiles [enter]<o:p></o:p></span></pre><pre
  987. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  988. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  989. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  990. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  991. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  992. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  993. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  994. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>&gt; <span
  995. class=GramE>abld</span> build winscw udeb [enter]<o:p></o:p></span></pre></div>
  996. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  997. style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></b></p>
  998. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  999. style='mso-ansi-language:EN-US'>Note:</span></b><span lang=EN-US
  1000. style='mso-ansi-language:EN-US'> <span style='mso-spacerun:yes'> </span>No
  1001. spaces must be present in the directory path where the SQliteS60 project is
  1002. located. Also, the command line console must be run with “Admin” privileges.<o:p></o:p></span></p>
  1003. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  1004. style='mso-ansi-language:EN-US'><br>
  1005. Writing an ADO.NET Provider using Net60 Compact Framework 1.0<o:p></o:p></span></b></p>
  1006. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>After the
  1007. successful conversion of the SQLite code to the S60 platform, the development
  1008. of an ADO.NET provider for Net60 that uses the SQLite library for Symbian OS can
  1009. be started. As there are some existing implementations of an ADO.NET provider
  1010. for the .NET Framework, this development did not have to start at the grass
  1011. roots level. Mono, for example, contains such an implementation <span
  1012. class=GramE>( </span><a href="http://www.mono-project.com">www.mono-project.com</a>
  1013. ). This could be used as a base for the ADO.NET provider for Net60.<o:p></o:p></span></p>
  1014. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The .NET Compact
  1015. Framework 1.0 only provides the basic interfaces like IDbConnection,
  1016. IDbCommand, <span class=GramE>IDbParameter</span> and so on. Other
  1017. functionality such as the base classes in the System.Data.Common namespace <span
  1018. class=GramE>are</span> not provided. Also the DbDataAdapter base class is not implemented.
  1019. So this implementation cannot support DataAdapters, however with these basic
  1020. interfaces it is possible to develop an ADO.NET Provider that supports all
  1021. basic features of the .NET Framework 1.1 for the desktop.<o:p></o:p></span></p>
  1022. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The
  1023. SQLiteS60 project results in a native Symbian DLL, sqlite.dll, which must be
  1024. used from within managed .NET code. Net60, and the .NET Compact Framework,
  1025. supports interoperability between managed and unmanaged code through a
  1026. mechanism called P/Invoke.<o:p></o:p></span></p>
  1027. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The diagram
  1028. below shows the interaction between the various components of the solution:<o:p></o:p></span></p>
  1029. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1030. <p class=MsoNormal><!--[if gte vml 1]><v:shapetype id="_x0000_t202"
  1031. coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
  1032. <v:stroke joinstyle="miter"/>
  1033. <v:path gradientshapeok="t" o:connecttype="rect"/>
  1034. </v:shapetype><v:shape id="_x0000_s1027" type="#_x0000_t202" style='position:absolute;
  1035. margin-left:62.95pt;margin-top:62.25pt;width:285.5pt;height:107.65pt;
  1036. z-index:1;mso-width-relative:margin;mso-height-relative:margin'>
  1037. <v:textbox style='mso-next-textbox:#_x0000_s1027'>
  1038. <![if !mso]>
  1039. <table cellpadding=0 cellspacing=0 width="100%">
  1040. <tr>
  1041. <td><![endif]>
  1042. <div>
  1043. <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
  1044. style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1045. <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
  1046. style='font-size:14.0pt;mso-bidi-font-size:11.0pt;line-height:115%;
  1047. mso-ansi-language:EN-US'>Net60<o:p></o:p></span></p>
  1048. </div>
  1049. <![if !mso]></td>
  1050. </tr>
  1051. </table>
  1052. <![endif]></v:textbox>
  1053. </v:shape><v:shape id="_x0000_s1030" type="#_x0000_t202" style='position:absolute;
  1054. margin-left:215.8pt;margin-top:126.3pt;width:132.85pt;height:43.75pt;
  1055. z-index:2;mso-width-relative:margin;mso-height-relative:margin'>
  1056. <v:textbox style='mso-next-textbox:#_x0000_s1030'>
  1057. <![if !mso]>
  1058. <table cellpadding=0 cellspacing=0 width="100%">
  1059. <tr>
  1060. <td><![endif]>
  1061. <div>
  1062. <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
  1063. style='mso-ansi-language:EN-US'>SQLiteS60.dll<o:p></o:p></span></p>
  1064. </div>
  1065. <![if !mso]></td>
  1066. </tr>
  1067. </table>
  1068. <![endif]></v:textbox>
  1069. </v:shape><v:shape id="_x0000_s1026" type="#_x0000_t202" style='position:absolute;
  1070. margin-left:62.95pt;margin-top:173.55pt;width:287.05pt;height:33.45pt;
  1071. z-index:3;mso-height-percent:200;mso-height-percent:200;mso-width-relative:margin;
  1072. mso-height-relative:margin'>
  1073. <v:textbox style='mso-fit-shape-to-text:t'>
  1074. <![if !mso]>
  1075. <table cellpadding=0 cellspacing=0 width="100%">
  1076. <tr>
  1077. <td><![endif]>
  1078. <div>
  1079. <p class=MsoNormal align=center style='text-align:center'>Symbian OS</p>
  1080. </div>
  1081. <![if !mso]></td>
  1082. </tr>
  1083. </table>
  1084. <![endif]></v:textbox>
  1085. </v:shape><v:shape id="_x0000_s1028" type="#_x0000_t202" style='position:absolute;
  1086. margin-left:62.95pt;margin-top:24.15pt;width:285.7pt;height:33.45pt;z-index:4;
  1087. mso-height-percent:200;mso-height-percent:200;mso-width-relative:margin;
  1088. mso-height-relative:margin'>
  1089. <v:textbox style='mso-next-textbox:#_x0000_s1028;mso-fit-shape-to-text:t'>
  1090. <![if !mso]>
  1091. <table cellpadding=0 cellspacing=0 width="100%">
  1092. <tr>
  1093. <td><![endif]>
  1094. <div>
  1095. <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
  1096. style='mso-ansi-language:EN-US'>.NET CF 1.0 App using SQLite<o:p></o:p></span></p>
  1097. </div>
  1098. <![if !mso]></td>
  1099. </tr>
  1100. </table>
  1101. <![endif]></v:textbox>
  1102. </v:shape><v:shape id="_x0000_s1029" type="#_x0000_t202" style='position:absolute;
  1103. margin-left:278.25pt;margin-top:149.15pt;width:70.2pt;height:20.9pt;z-index:5;
  1104. mso-width-relative:margin;mso-height-relative:margin'>
  1105. <v:textbox>
  1106. <![if !mso]>
  1107. <table cellpadding=0 cellspacing=0 width="100%">
  1108. <tr>
  1109. <td><![endif]>
  1110. <div>
  1111. <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
  1112. style='mso-ansi-language:EN-US'>PIPS <o:p></o:p></span></p>
  1113. </div>
  1114. <![if !mso]></td>
  1115. </tr>
  1116. </table>
  1117. <![endif]></v:textbox>
  1118. </v:shape><v:shape id="_x0000_s1031" type="#_x0000_t202" style='position:absolute;
  1119. margin-left:246.9pt;margin-top:62.25pt;width:101.75pt;height:38.55pt;
  1120. z-index:6;mso-width-relative:margin;mso-height-relative:margin'>
  1121. <v:textbox style='mso-next-textbox:#_x0000_s1031'>
  1122. <![if !mso]>
  1123. <table cellpadding=0 cellspacing=0 width="100%">
  1124. <tr>
  1125. <td><![endif]>
  1126. <div>
  1127. <p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;mso-bidi-font-size:
  1128. 11.0pt;line-height:115%;mso-ansi-language:EN-US'>System.Data.SQLiteClient.dll</span><span
  1129. style='font-size:10.0pt;mso-bidi-font-size:11.0pt;line-height:115%'><o:p></o:p></span></p>
  1130. </div>
  1131. <![if !mso]></td>
  1132. </tr>
  1133. </table>
  1134. <![endif]></v:textbox>
  1135. </v:shape><v:shape id="_x0000_s1034" type="#_x0000_t202" style='position:absolute;
  1136. margin-left:355.45pt;margin-top:67.25pt;width:118.1pt;height:33.55pt;
  1137. z-index:7;mso-width-relative:margin;mso-height-relative:margin' filled="f"
  1138. stroked="f">
  1139. <v:textbox style='mso-next-textbox:#_x0000_s1034'>
  1140. <![if !mso]>
  1141. <table cellpadding=0 cellspacing=0 width="100%">
  1142. <tr>
  1143. <td><![endif]>
  1144. <div>
  1145. <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
  1146. style='font-size:9.0pt;mso-bidi-font-size:11.0pt;line-height:115%;
  1147. mso-ansi-language:EN-US'>P/Invoke from managed code to native Symbian DLL</span><span
  1148. lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
  1149. </div>
  1150. <![if !mso]></td>
  1151. </tr>
  1152. </table>
  1153. <![endif]></v:textbox>
  1154. </v:shape><v:shape id="_x0000_s1037" type="#_x0000_t202" style='position:absolute;
  1155. margin-left:308.15pt;margin-top:98.15pt;width:39.7pt;height:15.65pt;z-index:8'
  1156. strokecolor="white">
  1157. <v:textbox>
  1158. <![if !mso]>
  1159. <table cellpadding=0 cellspacing=0 width="100%">
  1160. <tr>
  1161. <td><![endif]>
  1162. <div>
  1163. <p class=MsoNormal><o:p>&nbsp;</o:p></p>
  1164. </div>
  1165. <![if !mso]></td>
  1166. </tr>
  1167. </table>
  1168. <![endif]></v:textbox>
  1169. </v:shape><v:shapetype id="_x0000_t32" coordsize="21600,21600" o:spt="32"
  1170. o:oned="t" path="m,l21600,21600e" filled="f">
  1171. <v:path arrowok="t" fillok="f" o:connecttype="none"/>
  1172. <o:lock v:ext="edit" shapetype="t"/>
  1173. </v:shapetype><v:shape id="_x0000_s1036" type="#_x0000_t32" style='position:absolute;
  1174. margin-left:307.2pt;margin-top:100.9pt;width:0;height:25.35pt;z-index:9'
  1175. o:connectortype="straight"/><v:shape id="_x0000_s1033" type="#_x0000_t32"
  1176. style='position:absolute;margin-left:335.7pt;margin-top:90.2pt;width:25.95pt;
  1177. height:23.6pt;flip:x;z-index:10' o:connectortype="straight">
  1178. <v:stroke dashstyle="1 1" endarrow="block" endcap="round"/>
  1179. </v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout'>
  1180. <table cellpadding=0 cellspacing=0 align=left>
  1181. <tr>
  1182. <td width=83 height=31></td>
  1183. </tr>
  1184. <tr>
  1185. <td></td>
  1186. <td><img width=552 height=250 src="sqlite_port-Dateien/image001.gif" v:shapes="_x0000_s1027 _x0000_s1030 _x0000_s1026 _x0000_s1028 _x0000_s1029 _x0000_s1031 _x0000_s1034 _x0000_s1037 _x0000_s1036 _x0000_s1033"></td>
  1187. </tr>
  1188. </table>
  1189. </span><![endif]><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1190. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1191. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1192. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1193. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1194. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1195. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1196. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1197. <br style='mso-ignore:vglayout' clear=ALL>
  1198. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The native SQLite
  1199. methods, such as <b style='mso-bidi-font-weight:normal'>libversion</b>, <b
  1200. style='mso-bidi-font-weight:normal'>open</b> etc., are called using the
  1201. P/Invoke mechanism in the .NET code. To do this, the entry point of the corresponding
  1202. method in the SQLite library must be known. Symbian has a specific entry point
  1203. model. All methods are exported from a library by ordinal numbers instead of
  1204. method names. The relation of method name and export number can be found in the
  1205. generated .DEF file of the SQLite.dll or by using a dump tool.<o:p></o:p></span></p>
  1206. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The
  1207. following example shows how a native SQLite method is defined in .NET. The <b
  1208. style='mso-bidi-font-weight:normal'>DLLImort</b> attribute defines the library
  1209. name and the entry points were the method is located in the library. The CallingConvention
  1210. defines the type of data exchange between the unmanaged SQLite and the managed
  1211. .NET code. <o:p></o:p></span></p>
  1212. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  1213. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  1214. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  1215. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  1216. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  1217. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US style='font-size:
  1218. 7.5pt;line-height:110%;mso-ansi-language:EN-US'>[<span class=GramE>DllImport(</span>&quot;sqlite.dll&quot;, EntryPoint = &quot;#86&quot;, CallingConvention = _Convention)]<o:p></o:p></span></pre><pre
  1219. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1220. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1221. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1222. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  1223. mso-ansi-language:EN-US'>public</span></span><span lang=EN-US style='font-size:
  1224. 7.5pt;line-height:110%;mso-ansi-language:EN-US'> static extern SQLiteCode sqlite3_open(IntPtr filename, out IntPtr db);<o:p></o:p></span></pre></div>
  1225. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1226. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Based on
  1227. the existing implementations of SQLite for .NET it was easy to develop an
  1228. ADO.NET Provider that runs on the Compact Framework. To test the behavior of a
  1229. .NET application, this implementation provides a P/Invoke call for each <b
  1230. style='mso-bidi-font-weight:normal'>sqlite3_</b> method call to the Symbian
  1231. version contained in the sqlite.dll. <span class=GramE>These</span> P/Invokes
  1232. are performed in the SymbianMethods.cs file in the managed System.Data.SQLiteClient.dll
  1233. extension class.<o:p></o:p></span></p>
  1234. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Interestingly,
  1235. all applications are also executable on the smartphone device emulator. To
  1236. change between the emulator and device, only the emulator flag in the
  1237. connection string must be set to true or false. For the emulator the Windows
  1238. version of SQLite is required <span class=GramE>( </span><a
  1239. href="http://www.sqlite.org">www.sqlite.org</a> ), the emulator flag links the
  1240. P/Invoke call to that library.<o:p></o:p></span></p>
  1241. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  1242. style='mso-ansi-language:EN-US'>Deploying SQLiteS60 to the device<o:p></o:p></span></b></p>
  1243. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>In order to
  1244. deploy the SQLite database to device, the sqlite.dll must be deployed to the \sys\bin
  1245. directory and the System.Data.SQLiteClient.dll to the Red Five Labs GAC
  1246. repository on the device which is \Resource\RedFiveLabs\Gac. The sqlite.pkg is
  1247. used together with the Symbian makesis.exe to create an installable SQLite.SIS
  1248. file which deploys these two libraries to their respective destinations. If the
  1249. sqlite.dll and System.Data.SQLiteClient.dll are placed in the same directory as
  1250. the sqlite.pcg file, an example command line to generate the Sqlite.sis is <o:p></o:p></span></p>
  1251. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  1252. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  1253. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  1254. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  1255. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  1256. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US style='font-size:
  1257. 7.5pt;line-height:110%;mso-ansi-language:EN-US'>C:\temp\sis&gt;makesis sqlite.pkg<o:p></o:p></span></pre></div>
  1258. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  1259. style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></b></p>
  1260. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  1261. style='mso-ansi-language:EN-US'>Using SQLite<o:p></o:p></span></b></p>
  1262. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The
  1263. implementation for Compact Framework 1.0 contains the SQLiteConnection class
  1264. that handles the connection to the sqlite database and creates new
  1265. SQLiteCommand instances. With these instances database queries can be sent to
  1266. and the results received from the database. As a result a SQLiteDataReader set instance
  1267. can be returned. This class provides the functionality to step through the rows
  1268. of the result sets. Transactional processing can be performed by using the
  1269. SQLiteTransaction class. An instance for that class can be created over the
  1270. SQLiteConnection instance. Any SQLiteCommand can contain one or more SQL statements.
  1271. These statements are handled in the SQLiteStatement class. Each statement is
  1272. represented by an instance of that class. This class calls the native SQLite
  1273. methods to perform the database operations.<o:p></o:p></span></p>
  1274. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1275. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The
  1276. following example shows how to open a database by using the SQLiteConnection
  1277. class.<o:p></o:p></span></p>
  1278. <div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt:
  1279. solid #CCCCCC .75pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#EEEEEE;
  1280. margin-left:3.4pt;margin-right:3.4pt'><pre style='margin-top:3.4pt;margin-right:
  1281. 0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;line-height:110%;
  1282. background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;padding:0cm;
  1283. mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US style='font-size:
  1284. 7.5pt;line-height:110%;mso-ansi-language:EN-US'>SQLiteConnection _Connection = new <span
  1285. class=GramE>SQLiteConnection(</span>&quot;Data Source=test1.db;NewDatabase=True;<o:p></o:p></span></pre><pre
  1286. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1287. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1288. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1289. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span
  1290. style='mso-tab-count:5'>                                                  </span>Synchronous=Off<span
  1291. class=GramE>;Encoding</span>=UTF8;Emulator=true&quot;);<o:p></o:p></span></pre><pre
  1292. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1293. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1294. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1295. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>_<span
  1296. class=GramE>Connection.Open(</span>);<o:p></o:p></span></pre><pre
  1297. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1298. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1299. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1300. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  1301. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1302. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1303. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1304. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>SQLiteCommand cmd = _<span
  1305. class=GramE>Connection.CreateCommand(</span>);<o:p></o:p></span></pre><pre
  1306. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1307. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1308. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1309. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>cmd.CommandText = &quot;select id, orderid, article from orderdetails where OrderId = @OrderId&quot;;<o:p></o:p></span></pre><pre
  1310. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1311. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1312. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1313. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  1314. mso-ansi-language:EN-US'>cmd.Parameters.Add(</span></span><span lang=EN-US
  1315. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>&quot;@OrderId&quot;, DbType.Int32).Value = orderId;<o:p></o:p></span></pre><pre
  1316. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1317. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1318. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1319. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  1320. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1321. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1322. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1323. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>DataTable table = new <span
  1324. class=GramE>DataTable(</span>);<o:p></o:p></span></pre><pre style='margin-top:
  1325. 3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;text-align:justify;
  1326. line-height:110%;background:#EEEEEE;border:none;mso-border-alt:solid #CCCCCC .75pt;
  1327. padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span lang=EN-US
  1328. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  1329. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1330. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1331. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1332. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  1333. mso-ansi-language:EN-US'>table.Columns.Add(</span></span><span lang=EN-US
  1334. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>&quot;Id&quot;);<o:p></o:p></span></pre><pre
  1335. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1336. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1337. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1338. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  1339. mso-ansi-language:EN-US'>table.Columns.Add(</span></span><span lang=EN-US
  1340. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>&quot;OrderId&quot;);<o:p></o:p></span></pre><pre
  1341. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1342. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1343. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1344. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  1345. mso-ansi-language:EN-US'>table.Columns.Add(</span></span><span lang=EN-US
  1346. style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>&quot;Article&quot;);<o:p></o:p></span></pre><pre
  1347. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1348. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1349. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1350. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  1351. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1352. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1353. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1354. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>SQLiteDataReader reader = <span
  1355. class=GramE>cmd.ExecuteReader(</span>);<o:p></o:p></span></pre><pre
  1356. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1357. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1358. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1359. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  1360. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1361. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1362. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1363. class=GramE><span lang=EN-US style='font-size:7.5pt;line-height:110%;
  1364. mso-ansi-language:EN-US'>while</span></span><span lang=EN-US style='font-size:
  1365. 7.5pt;line-height:110%;mso-ansi-language:EN-US'> (reader.Read())<o:p></o:p></span></pre><pre
  1366. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1367. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1368. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1369. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>{<o:p></o:p></span></pre><pre
  1370. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1371. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1372. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1373. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>    </span>DataRow row = <span
  1374. class=GramE>table.NewRow(</span>);<o:p></o:p></span></pre><pre
  1375. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1376. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1377. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1378. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>    </span><span
  1379. class=GramE>row[</span>&quot;Id&quot;] = reader.GetInt32(0);<o:p></o:p></span></pre><pre
  1380. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1381. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1382. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1383. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>    </span><span
  1384. class=GramE>row[</span>&quot;OrderId&quot;] = reader.GetInt32(1);<o:p></o:p></span></pre><pre
  1385. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1386. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1387. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1388. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>    </span><span
  1389. class=GramE>row[</span>&quot;Article&quot;] = reader.GetString(2);<o:p></o:p></span></pre><pre
  1390. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1391. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1392. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1393. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><span style='mso-spacerun:yes'>    </span><span
  1394. class=GramE>table.Rows.Add(</span>row);<o:p></o:p></span></pre><pre
  1395. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1396. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1397. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1398. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>}<o:p></o:p></span></pre><pre
  1399. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1400. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1401. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1402. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></pre><pre
  1403. style='margin-top:3.4pt;margin-right:0cm;margin-bottom:3.4pt;margin-left:0cm;
  1404. text-align:justify;line-height:110%;background:#EEEEEE;border:none;mso-border-alt:
  1405. solid #CCCCCC .75pt;padding:0cm;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt'><span
  1406. lang=EN-US style='font-size:7.5pt;line-height:110%;mso-ansi-language:EN-US'>dataGridView.DataSource = table;<o:p></o:p></span></pre></div>
  1407. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1408. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>The
  1409. SQLiteCommand instance contains a select statement that loads the orders with
  1410. the specified OrderId. The result set of this query is then filled in a data
  1411. table that is databinded to <span class=GramE>an</span> dataGridView that
  1412. displays the result. An example application is provided in the form of
  1413. SqlMobileTest project.<o:p></o:p></span></p>
  1414. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1415. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  1416. style='mso-ansi-language:EN-US'>Conclusion<o:p></o:p></span></b></p>
  1417. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>With this
  1418. conversion of SQLite, it is now possible to create .NET applications with database
  1419. support for the great family of Symbian S60 smartphones. With the upcoming release
  1420. of version 9.4 the Symbian OS provides an implementation of SQLite but this
  1421. version is not released yet and only new devices will get this database
  1422. support. With this conversion all S60 3<sup>rd</sup> Edition devices will be able
  1423. to use SQLite. Together with the Red Five Labs Net60 implementation of the .NET
  1424. Compact Framework it is possible to run .NET applications on Symbian OS. Together
  1425. with the ADO.NET provider for this SQLite implementation these applications can
  1426. use database functionality like any other application on a personal computer.<o:p></o:p></span></p>
  1427. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1428. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span lang=EN-US
  1429. style='mso-ansi-language:EN-US'>Tools Used for this project<o:p></o:p></span></b></p>
  1430. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'>Microsoft
  1431. Visual Studio 2005 together with the Carbide.vs Plugin (http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide/<span
  1432. class=GramE>index.html )</span> were used in this project.<o:p></o:p></span></p>
  1433. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><span
  1434. style='mso-spacerun:yes'> </span>Additionally the S60 SDK and the Symbian PIPS
  1435. SDK are required to compile the project. With the Carbide plug in it is
  1436. possible to develop native Symbian applications in the Visual Studio IDE and to
  1437. debug on the S60 emulator. To convert a S60 project (f.e. a BLD or MMP file) to
  1438. a Visual Studio project, the Import Wizard of the carbide plugin could be used.
  1439. It is located under the File menu. The user only has to select the s60 project
  1440. and to assign an S60 SDK (f.e. maintenance release or FP1/FP2). The rest of the
  1441. transformation does the wizard. So it is easy to convert existing projects to
  1442. use the carbide plugin.<o:p></o:p></span></p>
  1443. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1444. <p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></p>
  1445. </div>
  1446. </body>
  1447. </html>