From: JP... on
Hi... Our company just purchased some propriety software that is on a server
running MSSql.

I want to connect to it to retrieve data only. I can connect using ODBC
through Access 2000, but each time I try to use the tables, I have to supply
the password for the program.

I want to use VB6.0 to connect to the database, but can't figure out the
connection string.

An example provided in VB6.0 is:
wrkODBC.OpenConnection("Connection1", , , _
"ODBC;DATABASE=pubs;UID=sa;PWD=;DSN=publishers")
(what reference do I need in the Project to be sure what I need works?)

I use Crystal Reports with that softwrae now and when I try to connect, it
asks for the Database source. That is (for instance), ResumeCAD32

When I hit next button it shows me the server is (for instance) ResumeCAD32,
User ID = sa, Password (which I can fillin) and "Database "RCSQL"...if I fill
this in, I have the connection string for Crystal Reports...but I need to
connect using VB6.0...

Is this too vague? Would appreciate any help or suggestions...thanks...
--
Thanks in advance for any assistance you can give me...

JP
From: JP... on
Hi All...kept fiddlin' and figured it out...thanks
--
Thanks in advance for any assistance you can give me...

JP


"JP..." wrote:

> Hi... Our company just purchased some propriety software that is on a server
> running MSSql.
>
> I want to connect to it to retrieve data only. I can connect using ODBC
> through Access 2000, but each time I try to use the tables, I have to supply
> the password for the program.
>
> I want to use VB6.0 to connect to the database, but can't figure out the
> connection string.
>
> An example provided in VB6.0 is:
> wrkODBC.OpenConnection("Connection1", , , _
> "ODBC;DATABASE=pubs;UID=sa;PWD=;DSN=publishers")
> (what reference do I need in the Project to be sure what I need works?)
>
> I use Crystal Reports with that softwrae now and when I try to connect, it
> asks for the Database source. That is (for instance), ResumeCAD32
>
> When I hit next button it shows me the server is (for instance) ResumeCAD32,
> User ID = sa, Password (which I can fillin) and "Database "RCSQL"...if I fill
> this in, I have the connection string for Crystal Reports...but I need to
> connect using VB6.0...
>
> Is this too vague? Would appreciate any help or suggestions...thanks...
> --
> Thanks in advance for any assistance you can give me...
>
> JP
From: Paul Clement on
On Thu, 22 Jul 2010 13:51:56 -0700, JP... <JP(a)discussions.microsoft.com> wrote:

� Hi All...kept fiddlin' and figured it out...thanks

Just an FYI to anyone reading, the below link is a great reference for connection strings:

http://www.connectionstrings.com/


Paul
~~~~
Microsoft MVP (Visual Basic)
From: Jeff Johnson on
"JP..." <JP(a)discussions.microsoft.com> wrote in message
news:681B5BAC-6CA3-4DED-94A2-B6B461364C79(a)microsoft.com...

> Hi... Our company just purchased some propriety software that is on a
> server
> running MSSql.
>
> I want to connect to it to retrieve data only. I can connect using ODBC
> through Access 2000, but each time I try to use the tables, I have to
> supply
> the password for the program.
>
> I want to use VB6.0 to connect to the database, but can't figure out the
> connection string.
>
> An example provided in VB6.0 is:
> wrkODBC.OpenConnection("Connection1", , , _
> "ODBC;DATABASE=pubs;UID=sa;PWD=;DSN=publishers")
> (what reference do I need in the Project to be sure what I need works?)
>
> I use Crystal Reports with that softwrae now and when I try to connect, it
> asks for the Database source. That is (for instance), ResumeCAD32
>
> When I hit next button it shows me the server is (for instance)
> ResumeCAD32,
> User ID = sa, Password (which I can fillin) and "Database "RCSQL"...if I
> fill
> this in, I have the connection string for Crystal Reports...but I need to
> connect using VB6.0...
>
> Is this too vague? Would appreciate any help or suggestions...thanks...

Looks like you were at least missing the Driver={SQL Server} or however that
part looks (been a loooong time).