・コマンドプロンプトより
createdb POLite DatabaseName password
・プログラムからは
Public Shared Sub CreateDb()
Dim fileName As String = "<ORACLE_HOME>\Mobile\Sdk\bin\CreateDb"
Dim args As String = "POLite DatabaseName password"
Dim process As System.Diagnostics.Process
process = System.Diagnostics.Process.Start(fileName, args)
process.WaitForExit()
End Sub
Dim fileName As String = "<ORACLE_HOME>\Mobile\Sdk\bin\CreateDb"
Dim args As String = "POLite DatabaseName password"
Dim process As System.Diagnostics.Process
process = System.Diagnostics.Process.Start(fileName, args)
process.WaitForExit()
End Sub
■WindowsPCより接続を確認するには
・コマンドプロンプトより
msql system/password@JDBC:POLite:DatabaseName
■DBを削除するには
・コマンドプロンプトより
createdb POLite DatabaseName password
・プログラムより
Public Shared Sub RemoveDb()
Dim fileName As String = "<ORACLE_HOME>\Mobile\Sdk\bin\RemoveDb"
Dim args As String ="POLite DatabaseNmae"
Dim process As System.Diagnostics.Process
process = System.Diagnostics.Process.Start(fileName, args)
process.WaitForExit()
End Sub
Dim fileName As String = "<ORACLE_HOME>\Mobile\Sdk\bin\RemoveDb"
Dim args As String ="POLite DatabaseNmae"
Dim process As System.Diagnostics.Process
process = System.Diagnostics.Process.Start(fileName, args)
process.WaitForExit()
End Sub
■DBに表を作成するには
・コマンドプロンプトより
msqlで接続後「Create Tabele」SQL文を流す
又はmsqlで接続後にsqlファイルを指定する。(Poldemo.sqlはデモ用テーブル)
SQL> @<ORACLE_HOME>Mobile\DBS\Poldemo.sql
・プログラムより
Public Shared Sub CreateTable(sqlFilePath as string)
Dim filename As String = "<ORACLE_HOME>Mobile\Sdk\bin\msql"
Dim args As String = "system/password@jdbc:POLite:DatabaseName @" & sqlFilePath
Dim process As System.Diagnostics.Process
process = System.Diagnostics.Process.Start(filename, args)
process.WaitForExit()
process.Close()
End Sub
Dim filename As String = "<ORACLE_HOME>Mobile\Sdk\bin\msql"
Dim args As String = "system/password@jdbc:POLite:DatabaseName @" & sqlFilePath
Dim process As System.Diagnostics.Process
process = System.Diagnostics.Process.Start(filename, args)
process.WaitForExit()
process.Close()
End Sub
0 件のコメント:
コメントを投稿