Click here to Skip to main content
15,916,463 members
Home / Discussions / Database
   

Database

 
QuestionHow to get Oracle service names Pin
Xiaoming Qian18-Apr-06 17:05
Xiaoming Qian18-Apr-06 17:05 
AnswerRe: How to get Oracle service names Pin
phimix18-Apr-06 18:48
phimix18-Apr-06 18:48 
GeneralRe: How to get Oracle service names Pin
Xiaoming Qian18-Apr-06 22:02
Xiaoming Qian18-Apr-06 22:02 
AnswerRe: How to get Oracle service names Pin
phimix18-Apr-06 23:28
phimix18-Apr-06 23:28 
Questionhow to access nested tables of oracle through ADO.net........ Pin
kam_ps18-Apr-06 9:58
kam_ps18-Apr-06 9:58 
AnswerRe: how to access nested tables of oracle through ADO.net........ Pin
Darpan Gogia18-Apr-06 23:21
Darpan Gogia18-Apr-06 23:21 
Questioncreate sql data base in server by code Pin
amrosaad18-Apr-06 9:04
amrosaad18-Apr-06 9:04 
Questioncreate sql data base in server Pin
amrosaad18-Apr-06 8:58
amrosaad18-Apr-06 8:58 
hi i went create new data base from my computer to server
when i creat in local is ok
this my code to create data

Private Sub ButCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButCreate.Click
ButCreate.Enabled = False
btnExit.Enabled = False
Dim dmoServer As New SQLDMO.SQLServer
Dim filSqlScript As IO.StreamReader
Dim strPathToFile As String
Dim I As Integer
Dim StrDataScript0 As String
Dim StrDataScript1 As String
Dim StrDataScript2 As String
Dim strDrive As String
If TxtDBName.Text <> "" Then
If txtDBChar.Text <> "" Then
'If IsNumeric(txtDBChar.Text) = False Then

dmoServer.LoginSecure = True
Try
dmoServer.Start(True, MainMod.serverName)
Try
dmoServer.Connect(MainMod.serverName)
Catch exc As System.Runtime.InteropServices.COMException
MessageBox.Show("لاتوجد قاعدة بيانات أو لم يتم السماح بدخولها", "خـطـأ", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
End Try
Catch ex As System.Runtime.InteropServices.COMException
Try
dmoServer.Connect(MainMod.serverName)
Catch exc As System.Runtime.InteropServices.COMException
MessageBox.Show("لاتوجد قاعدة بيانات أو لم يتم السماح بدخولها", "خـطـأ", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
End Try
Catch ex As System.UnauthorizedAccessException
Dim objDbLogin As New frmDbLogin
If objDbLogin.ShowDialog(Me) = DialogResult.OK Then
Try
dmoServer.Start(True, MainMod.serverName, objDbLogin.txtUser.Text, objDbLogin.txtPassword.Text)
Try
dmoServer.Connect(MainMod.serverName, objDbLogin.txtUser.Text, objDbLogin.txtPassword.Text)
Catch exc As System.Runtime.InteropServices.COMException
MessageBox.Show("لاتوجد قاعدة بيانات أو لم يتم السماح بدخولها", "خـطـأ", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
End Try
Catch exc As System.Runtime.InteropServices.COMException
Try
dmoServer.Connect(MainMod.serverName, objDbLogin.txtUser.Text, objDbLogin.txtPassword.Text)
Catch exce As System.Runtime.InteropServices.COMException
MessageBox.Show("لاتوجد قاعدة بيانات أو لم يتم السماح بدخولها", "خـطـأ", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
End Try
Catch exce As System.UnauthorizedAccessException
Try
dmoServer.Connect(MainMod.serverName, objDbLogin.txtUser.Text, objDbLogin.txtPassword.Text)
Catch exc As System.Runtime.InteropServices.COMException
MessageBox.Show("لاتوجد قاعدة بيانات أو لم يتم السماح بدخولها", "خـطـأ", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
End Try
End Try
End If
End Try


PrgBarCreate.Value = 10
Label3.Text = PrgBarCreate.Value & "%"
filSqlScript = IO.File.OpenText(Application.StartupPath & "\DataScript.sql")
PrgBarCreate.Value = 20
Label3.Text = PrgBarCreate.Value & "%"
StrDataScript0 = Replace(filSqlScript.ReadToEnd, "Amazon", TxtDBName.Text)
strDrive = dmoServer.Properties.Application.FullName.Substring(0, 3)
StrDataScript1 = Replace(StrDataScript0, "C:\", strDrive)
StrDataScript2 = Replace(StrDataScript1, "rplc", txtDBChar.Text)
PrgBarCreate.Value = 30
Label3.Text = PrgBarCreate.Value & "%"
'Try
dmoServer.ExecuteImmediate(StrDataScript2)
PrgBarCreate.Value = 40
Label3.Text = PrgBarCreate.Value & "%"
filSqlScript.Close()
PrgBarCreate.Value = 50
Label3.Text = PrgBarCreate.Value & "%"
For I = 51 To 100
Thread.Sleep(100)
PrgBarCreate.Value = I
Label3.Text = PrgBarCreate.Value & "%"
Next


22222222222
AnswerRe: create sql data base in server Pin
Colin Angus Mackay18-Apr-06 22:35
Colin Angus Mackay18-Apr-06 22:35 
Questioncalculations in sql Pin
Minoo S18-Apr-06 7:03
Minoo S18-Apr-06 7:03 
AnswerRe: calculations in sql Pin
Darpan Gogia18-Apr-06 23:29
Darpan Gogia18-Apr-06 23:29 
GeneralRe: calculations in sql Pin
Minoo S19-Apr-06 6:13
Minoo S19-Apr-06 6:13 
GeneralRe: calculations in sql Pin
Minoo S21-Apr-06 8:38
Minoo S21-Apr-06 8:38 
QuestionEasy and fast question Pin
papa198018-Apr-06 3:24
papa198018-Apr-06 3:24 
AnswerRe: Easy and fast question Pin
Colin Angus Mackay18-Apr-06 4:35
Colin Angus Mackay18-Apr-06 4:35 
AnswerRe: Easy and fast question Pin
Paul Conrad18-Apr-06 4:37
professionalPaul Conrad18-Apr-06 4:37 
QuestionSQL Error Number and Description Needed Pin
Brendan Vogt18-Apr-06 3:03
Brendan Vogt18-Apr-06 3:03 
AnswerRe: SQL Error Number and Description Needed Pin
Colin Angus Mackay18-Apr-06 4:42
Colin Angus Mackay18-Apr-06 4:42 
AnswerRe: SQL Error Number and Description Needed Pin
Duncan Edwards Jones18-Apr-06 21:01
professionalDuncan Edwards Jones18-Apr-06 21:01 
QuestionExecuting BCP from C# code Pin
phimix18-Apr-06 2:18
phimix18-Apr-06 2:18 
AnswerRe: Executing BCP from C# code Pin
phimix19-Apr-06 1:03
phimix19-Apr-06 1:03 
QuestionSql Server Pin
Krishnatv18-Apr-06 0:53
Krishnatv18-Apr-06 0:53 
AnswerRe: Sql Server Pin
Colin Angus Mackay18-Apr-06 1:48
Colin Angus Mackay18-Apr-06 1:48 
GeneralThank u Pin
Krishnatv18-Apr-06 2:30
Krishnatv18-Apr-06 2:30 
QuestionProblem Printing Labels using SQL 2000 Reporting Services Pin
slave11e18-Apr-06 0:15
slave11e18-Apr-06 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.