Solved

VB Client Communicate with Remote SQL Server via SSL

Posted on 2001-06-05
7
207 Views
Last Modified: 2011-09-20
I am trying to figure out how I can use my existing VB client application (EXE) to post data to a remote SQL Server database using an Internet connection.  I definitely want to use SSL for encryption.

I read that I need to purchase a security certificate and use RDS but I haven't seen any examples or how-to documents.  I would like a set of generic step-by-step instructions for accomplishing this task.  Sample VB code would also be nice.

TIA!
0
Comment
Question by:imayooper2
[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
7 Comments
 
LVL 5

Accepted Solution

by:
AndrewDev earned 200 total points
ID: 6156096
Using ADO you can establish a session to a server across an internet connection using the servers TCP/IP address as follows:

'Establishing DSNless Connection
strConn "PROVIDER=SQLOLEDB;SERVER=192.168.0.5;uid=xxx;pwd=xxx;database=xxx;"
Set dbConn = CreateObject("ADODB.Connection")
dbConn.Open strConn
Set rs = dbConn.execute(strSQLQuery)

This ADO utilities class may be of use to you
http://www.freevbcode.com/ShowCode.Asp?ID=1150

I am still investigating the certificate issue you raised but the above code will connect you to a remote SQL database

Regards
Andrew

0
 
LVL 1

Expert Comment

by:dalexis
ID: 6156288
If you can't use SSL, you'd want to secure the traffic between the client app and SQL Server by setting SQL Server to only use the "Multi-protocol with encryption" network library, rather than the TCP/IP library.  This works over IP connections, and encrypts all communications to and from the server.

Exposing your SQL Server to the world by allowing direct connections over the Internet is something you want to avoid.  A better solution would be to implement a server-side component that encapsulates all access to the database, so that the client app *never* connects directly to the database.  The component can be secured by running within MTS or COM+ under an account that has rights to connect to the SQL Server.  It can even be run totally inside the firewall for even better security.

You can still use ADO on the client to manage datausing disconnected recordsets.

- David Alexis
0
 
LVL 4

Expert Comment

by:vindevogel
ID: 6159139
what we do is this :

Develop an ActiveX component, running on the server that can update the database.

In your object, you can use plain ADO, compiled, so no worries there.

The pages call this object and pass data to it using PostForm. (better than request object)

Your SSL is guaranteed.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:imayooper2
ID: 6160312
vindevogel,

Are you refering to ASP pages in your solution?  I'm stuck with a vb client app, not a web app.  If you are talking about a client app, how do I utilize the https protocol to call the activex object using PostForm?

Let me know if I misunderstood your comment.
0
 
LVL 4

Expert Comment

by:vindevogel
ID: 6162643
No, we're using ASP pages .... sorry.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7132912
Hi imayooper2,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept AndrewDev's comment(s) as an answer.

imayooper2, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with my recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7167831
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Range to Select 5 56
Notepad++ how to remove delimiter : from beggning of the line? 3 127
VBA: Insert New column with specific format type 12 55
Problem to line 23 74
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 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