Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Switching a VB application from Oracle to SQL Server


Message #1 by "Mark Bowser" <mbowser@g...> on Fri, 25 Oct 2002 14:32:48 -0400
I understand. That's why my code is now:

Private Sub Class_Initialize()
'connects to the oracle (now MS-SQL Server) database when the class is 
initiated
   
    Dim strConnStr  As String
    Dim MyChar
   
    On Error GoTo ehInit

    'get the data path from the ListToolData.txt file
    'this file is included with the setup package,
    'and typically installed in the system directory
    'MsgBox "App.Path is:  " & App.Path
    'Open App.Path & "\ListToolData.txt" For Input As #1
    'Do While Not EOF(1)   ' Loop until end of file.
        'MyChar =3D MyChar & Input(1, #1)   ' Get one character.
    'Loop
    'Close #1
   
    Set cnConn =3D New ADODB.Connection
    'strConnStr =3D "Provider=3DMSDASQL;Data Source=3D" & MyChar
    'strConnStr =3D "DSN=3DSQL01;UID=3Dgssread;PWD=3Dgssr;"
    cnConn.ConnectionString =3D 
"DSN=3DIron_Duke;User_Id=3Dgssread;Password=3Dgssr;"
    'cnConn.Open strConnStr
   
    Exit Sub
   
ehInit:
    bolError =3D True
    strErrMsg =3D Err.Description
    lngErrNum =3D Err.Number
   
End Sub


Do you see anything that should change?


-----Original Message-----
From: Cremieux, Judith K. [mailto:Judith.Cremieux@i...]
Sent: Friday, October 25, 2002 5:18 PM
To: professional vb
Subject: [pro_vb] RE: Switching a VB application from Oracle to SQL
Server


well you can't use MSDAORA which is a MS driver for Oracle
You need to use another provider - one for MS Sql

> -----Original Message-----
> From:	Mark Bowser [SMTP:mbowser@g...]
> Sent:	Friday, October 25, 2002 3:53 PM
> To:	professional vb
> Cc:	Judith.Cremeux@i...
> Subject:	[pro_vb] RE: Switching a VB application from Oracle to SQL 
Server
>
> Judith,
>
> My code looked as follows:
>
> Private Sub Class_Initialize()
> 'connects to the oracle (now MS-SQL Server) database when the class is
> initiated
>    
>     Dim strConnStr  As String
>     Dim MyChar
>    
>     On Error GoTo ehInit
>
>     'get the data path from the ListToolData.txt file
>     'this file is included with the setup package,
>     'and typically installed in the system directory
>     MsgBox "App.Path is:  " & App.Path
>     Open App.Path & "\ListToolData.txt" For Input As #1
>     Do While Not EOF(1)   ' Loop until end of file.
>         MyChar =3D MyChar & Input(1, #1)   ' Get one character.
>     Loop
>     Close #1
>    
>     Set cnConn =3D New ADODB.Connection
>     strConnStr =3D "Provider=3DMSDAORA;Data Source=3D" & MyChar
>    
>     cnConn.Open strConnStr
>    
>     Exit Sub
>    
> ehInit:
>     bolError =3D True
>     strErrMsg =3D Err.Description
>     lngErrNum =3D Err.Number
>    
> End Sub
>
>
> The string within the ListToolData.txt file, read as follows:
>
> IRONDUKE.GUIDESTAR.NET;User ID=3Dgsschema; Password=3Dgss01;
>
>
>
> -----Original Message-----
> From: Cremieux, Judith K. [mailto:Judith.Cremieux@i...]
> Sent: Friday, October 25, 2002 4:03 PM
> To: professional vb
> Subject: [pro_vb] RE: Switching a VB application from Oracle to SQL
> Server
>
>
> No Mark
> For instance in the VB that did work with Oracle did you do something
> like this?
> Dim DBSConn as ADODB.Connection
> strConn =3D  "PROVIDER=3DMSDataShape;Data 
PROVIDER=3DMSDASQL;dsn=3DIRTS;"
> DBSconn.Open  strConn, sUser, sPassword 
> > -----Original Message-----
> > From:	Mark Bowser [SMTP:mbowser@g...]
> > Sent:	Friday, October 25, 2002 2:47 PM
> > To:	professional vb
> > Subject:	[pro_vb] RE: Switching a VB application from Oracle to
> SQL Server
> >
> > No. I'm pointing to SQL Server?
> >
> > -----Original Message-----
> > From: Cremieux, Judith K. [mailto:Judith.Cremieux@i...]
> > Sent: Friday, October 25, 2002 3:28 PM
> > To: professional vb
> > Subject: [pro_vb] RE: Switching a VB application from Oracle to SQL
> > Server
> >
> >
> > how are you pointing to Oracle now?
> > dsn?
> >
> > > -----Original Message-----
> > > From:	Mark Bowser [SMTP:mbowser@g...]
> > > Sent:	Friday, October 25, 2002 1:33 PM
> > > To:	professional vb
> > > Subject:	[pro_vb] Switching a VB application from Oracle to SQL
> > Server
> > >
> > > Hi,
> > >
> > > I've inherited an VB6 application here at work that originally was 

> > > getting it's data from and Oracle database. As part of a upward
> > > migration, my company has converted from all of it's Oracle
> databases
> > to
> > > using MS SQL Server for it's database efforts. They've also
> > transformed
> > > & migrated the data from the Oracle databases to the new SQL
> > databases.
> > > In order to get the application that used to work functional 
again,
> I
> > > need to know how do I get it to point to and connect to the new 
SQL
> > > counterpart which has the same tables & fields that the legacy
> Oracle
> > > database had. I'm in dire need, so whoever reads this, PLEASE 
write
> me
> >
> > > back soon. Also, my numbers are:
> > >
> > >  (xxx) xxx-xxxx  - Work
> > >  (xxx) xxx-xxxx  - Cell
> > >
> > > Your helpfulness is appreciated.
> > >
> > > 		Mark
> > >
> > >
> > >
> > > ---
> > > Visual C# - A Guide for VB6 Developers
> > > This book will make it easy to transfer your skills
> > > from Visual Basic 6 to C#, the language of choice
> > > of the .NET Framework.
> > > http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059
> > >
> > > ---
> > > Change your mail options at http://p2p.wrox.com/manager.asp or>
> >
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059
> >
> >
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059
> >
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059
>


---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059


  Return to Index