Click here to Skip to main content
15,914,488 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionebook on Vb.net and XML Pin
εїзεїзεїз13-Feb-10 22:02
εїзεїзεїз13-Feb-10 22:02 
AnswerRe: ebook on Vb.net and XML Pin
Andy_L_J14-Feb-10 15:27
Andy_L_J14-Feb-10 15:27 
QuestionCan someone explain to me how to use "waveOutGetVolume" and "waveOutSetVolume" Function in VB.net? Pin
Jungu Choi13-Feb-10 21:26
Jungu Choi13-Feb-10 21:26 
AnswerRe: Can someone explain to me how to use "waveOutGetVolume" and "waveOutSetVolume" Function in VB.net? Pin
Andy_L_J14-Feb-10 19:25
Andy_L_J14-Feb-10 19:25 
GeneralRe: Can someone explain to me how to use "waveOutGetVolume" and "waveOutSetVolume" Function in VB.net? Pin
Richard MacCutchan14-Feb-10 22:36
mveRichard MacCutchan14-Feb-10 22:36 
GeneralRe: Can someone explain to me how to use "waveOutGetVolume" and "waveOutSetVolume" Function in VB.net? Pin
Andy_L_J15-Feb-10 0:12
Andy_L_J15-Feb-10 0:12 
GeneralRe: Can someone explain to me how to use "waveOutGetVolume" and "waveOutSetVolume" Function in VB.net? Pin
Richard MacCutchan15-Feb-10 2:15
mveRichard MacCutchan15-Feb-10 2:15 
QuestionWhich one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Аslam Iqbal12-Feb-10 4:17
professionalАslam Iqbal12-Feb-10 4:17 
Which one is the best for oracle server? System.Data.OleDb(.Net Faramework Data provider for ole db) or System.Data.OracleClient(.Net Faramework Data provider for Oralce)?Confused | :confused:
i'm using vb.net8

Public Shared DB_Connection As New OleDbConnection, DB_Command As New OleDbCommand

Or
Public Shared DB_Connection As New OracleConnection, DB_Command As New OracleCommand 


I have creted a class ORACLE_SQL.vb for some basic oparation(DDL,DML) in oracle server. 3 pc are connected to a single database server. Both '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce' works replacing (swaping) the above Declarations and few more modification.
But i don't know which is the best. Can u plz tell me about the different between '.Net Faramework Data provider for ole db' and '.Net Faramework Data provider for Oralce'?
Thanks for reading my Q Big Grin | :-D .

Here is some code of ORACLE_SQL.vb class:<br />
<br />
    Public Sub New()<br />
        If DB_Connection.State <> ConnectionState.Open Then<br />
            Dim CONNECTION_STRING As String = ""<br />
            'NewTec_Connection provides a default security for my app<br />
            Dim NC As New NewTec_Connection<br />
            CONNECTION_STRING = "Server=" & NC.ServerName & ";Uid=" & NC.UserName & ";Pwd=" & NC.Password<br />
            Try<br />
                DB_Connection = New OracleConnection(CONNECTION_STRING)<br />
                DB_Connection.Open()<br />
                'Create a transaction point<br />
                BeginTransaction()<br />
            Catch ex As Exception<br />
                MsgBox("Can't use New() without having connection with 'NewTec' Server! Try New($) or New($,$,$) constructor.", MsgBoxStyle.Critical)<br />
                Throw ex<br />
            End Try<br />
            'different types connections for oledb 'CONNECTION_STRING = "Provider=OraOLEDB.Oracle.1;Password=mypw;Persist Security Info=True;User ID=myname;Data Source=myserver"        'mdb'= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FileName        'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\DDLTEST.mdb;Persist Security Info=True;Jet OLEDB:Database Password=asd        'pw access="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Desktop\pwdb.mdb;Persist Security Info=True;Jet OLEDB:Database Password=***"        'ms sql=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=iZMA\SQLEXPRESS        'CONNECTION_STRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=iZMA\SQLEXPRESS"        'DB_Connection = New OleDbConnection(CONNECTION_STRING)        'DB_Connection.Open()<br />
        End If<br />
    End Sub<br />
<br />
    ''' <summary><br />
    ''' Connect to oracle.<br />
    ''' </summary><br />
    ''' <param name="CONNECTION_STRING">set CONNECTION_STRING Like 'Server=giit;Uid=iZMA;Pwd=***' if using oracle provider. Otherwise for oledb 'CONNECTION_STRING = "Provider=OraOLEDB.Oracle.1;Password=mypw;Persist Security Info=True;User ID=myname;Data Source=myserver"</param><br />
    ''' <remarks></remarks><br />
<br />
    Public Sub New(ByVal CONNECTION_STRING As String)<br />
        If DB_Connection.State <> ConnectionState.Open Then<br />
            DB_Connection = New OracleConnection(CONNECTION_STRING)<br />
            DB_Connection.Open()<br />
            BeginTransaction()' UF<br />
        End If<br />
    End Sub<br />
<br />
    Sub New(ByVal ServerName As String, ByVal UserName As String, ByVal Password As String)<br />
        Dim CONNECTION_STRING As String = "Server=" & ServerName & ";Uid=" & UserName & ";Pwd=" & Password<br />
        If DB_Connection.State <> ConnectionState.Open Then<br />
            DB_Connection = New OracleConnection(CONNECTION_STRING)<br />
            DB_Connection.Open()<br />
            BeginTransaction()<br />
        End If<br />
    End Sub<br />
<br />
'Execute<br />
    ''' <summary><br />
    ''' Not for select. For Insert, update, delete Statment.<br />
    ''' </summary><br />
    ''' <param name="SQL_Command"></param><br />
    ''' <returns></returns><br />
    ''' <remarks></remarks><br />
<br />
    Function Execute(ByVal SQL_Command As String) As Integer<br />
        Dim AffectedRow As Integer<br />
        DB_Command.CommandText = SQL_Command<br />
        AffectedRow = DB_Command.ExecuteNonQuery()<br />
        RequireCommit = True<br />
        Return AffectedRow<br />
    End Function<br />
<br />

'''''''''''''''''*************************************
AnswerRe: Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Steven J Jowett12-Feb-10 5:21
Steven J Jowett12-Feb-10 5:21 
GeneralRe: Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Аslam Iqbal12-Feb-10 6:43
professionalАslam Iqbal12-Feb-10 6:43 
GeneralRe: Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Steven J Jowett12-Feb-10 7:06
Steven J Jowett12-Feb-10 7:06 
AnswerRe: Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Eddy Vluggen12-Feb-10 5:23
professionalEddy Vluggen12-Feb-10 5:23 
GeneralRe: Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Аslam Iqbal12-Feb-10 6:44
professionalАslam Iqbal12-Feb-10 6:44 
GeneralRe: Which one is the best for oracle server? System.Data.OleDb or System.Data.OracleClient??????? Pin
Eddy Vluggen12-Feb-10 7:06
professionalEddy Vluggen12-Feb-10 7:06 
QuestionGenerating Auto Invoice Numbers() - In Users Network Pin
Paramu197312-Feb-10 3:56
Paramu197312-Feb-10 3:56 
AnswerRe: Generating Auto Invoice Numbers() - In Users Network Pin
David Mujica12-Feb-10 5:21
David Mujica12-Feb-10 5:21 
QuestionIs Datagridview row filtered? Pin
cstrader23212-Feb-10 2:42
cstrader23212-Feb-10 2:42 
AnswerRe: Is Datagridview row filtered? Pin
Dave Kreskowiak12-Feb-10 2:53
mveDave Kreskowiak12-Feb-10 2:53 
QuestionVB6 Button Color Pin
Jaison V12-Feb-10 2:12
Jaison V12-Feb-10 2:12 
AnswerRe: VB6 Button Color Pin
CPallini12-Feb-10 2:36
mveCPallini12-Feb-10 2:36 
GeneralRe: VB6 Button Color Pin
Jaison V12-Feb-10 2:51
Jaison V12-Feb-10 2:51 
GeneralRe: VB6 Button Color Pin
Doctor Nick12-Feb-10 3:01
Doctor Nick12-Feb-10 3:01 
GeneralRe: VB6 Button Color Pin
Jaison V12-Feb-10 4:08
Jaison V12-Feb-10 4:08 
GeneralRe: VB6 Button Color Pin
Doctor Nick12-Feb-10 4:17
Doctor Nick12-Feb-10 4:17 
AnswerRe: VB6 Button Color Pin
Dave Kreskowiak12-Feb-10 2:44
mveDave Kreskowiak12-Feb-10 2:44 

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.