Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS ADO Connection string to Sun One ADO Connection string

Posted on 2004-07-31
10
Medium Priority
?
740 Views
Last Modified: 2011-09-20
Hi, I am using the following format, which works in a stand-alone  VB 6 application.

         
cnn.Open "Driver={SQL Server};" & _
           "Server=server.ip.com;" & _
           "Address=server.ip.com,1433;" & _
           "Database=dbname;" & _
           "Uid=dbuser;" & _
           "Pwd=dbpass"

When I try using this wtih the Sun One ADO object, it complains.  The following is the error:

SQLState: 28000 Native Error Code: 4002 [DataDirect][ODBC SQL Server Driver][SQL Server] SQLState: 01S00 Native Error Code: 0 [DataDirect][ODBC SQL Server Driver]Invalid connection string attribute

Anyone know where to look?
0
Comment
Question by:Discofish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11685145
You can try this:

strConnectString = "Provider=sqloledb;Data Source=(local); initial catalog = DatabaseName; user Id= sa; password= yourpassword"

cnn.open strConnectString
0
 
LVL 1

Expert Comment

by:abombs
ID: 11685152
I've seen this posted alot:

http://www.able-consulting.com/ADO_Conn.htm
0
 
LVL 31

Expert Comment

by:alorentz
ID: 11685166
Also, 1433 is standard port, so probably don't need that, and probably don't need address -

cnn.Open "Driver={SQL Server};" & _
           "Server=ipaddress;" & _
           "Database=dbname;" & _
           "Uid=dbuser;" & _
           "Pwd=dbpass"
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Expert Comment

by:alorentz
ID: 11685170
I think Address caused that error "Invalid connection string attribute"
0
 
LVL 2

Author Comment

by:Discofish
ID: 11685197
ok, when I take the address line out - this is what happens:

SQLState: S1000 Native Error Code: 11 [DataDirect][ODBC SQL Server Driver][libssclient18]General network error. Check your network documentation. SQLState: 01000 Native Error Code: 11 [DataDirect][ODBC SQL Server Driver][libssclient18]ConnectionOpen (,()). SQLState: 01S00 Native Error Code: 0 [DataDirect][ODBC SQL Server Driver]Invalid connection string attribute

Could it be that the drivers on the server are not configured properly?  I am using a  hosting account to try to connect to this database.

Note that I have connected to the DB from multiple IPs from the VB program I mentioned.

Let me know if there is anything else I can provide to help diagnose the problem
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11685215
Any luck with the oledb solution I suggested? It is doubtful that it will fix your problem but will only take a minute to try.

FtB
0
 
LVL 2

Author Comment

by:Discofish
ID: 11685252
Fritz,

No luck
0
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 2000 total points
ID: 11685278
Okay, the only other thing that I can offer if you haven't seen it is this:

http://swforums.sun.com/jive/thread.jspa?messageID=54158

http://docs.sun.com/source/817-2514-10/Ch8_BuildApp31.html

FtB
0
 
LVL 1

Expert Comment

by:abombs
ID: 11685291
What version SQL server is it?  Have you update your MDAC to 2.8?
0
 
LVL 2

Author Comment

by:Discofish
ID: 11685322
Ahh! Looks like I have to create a system DSN.  I will try this.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question