?
Solved

Connecting to web Server

Posted on 2003-02-28
9
Medium Priority
?
135 Views
Last Modified: 2011-09-20
Hi all,

Can anyone tell me how to connect the vb application to a Database which is in the Web Server

For ex:

I insert some Data from my vb Application and the same should get inserted in the Database on the web Server

Pls help soon
0
Comment
Question by:jafari
[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
9 Comments
 

Expert Comment

by:kalihto
ID: 8047477
in the connectionstring add 'Server=<SERVERNAME/SERVERIP>;' to connect to a web server database
0
 

Expert Comment

by:MarkusKTC
ID: 8047487
What Database?

In VB its easily to connect to many Databases:

Sample for connection to a Text DB
Set oCN = CreateObject ("ADODB.Connection")
oCN.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\; extended properties=""text;HDR=YES;FMT=Delimited;separator="";"""""
Set oRs = CreateObject ("adodb.Recordset")

oRs.CursorType = 3 'adOpenStatic
oRs.LockType   = 3 'adlockoptimistic
strSQLStmt = " select * from 'Location of Your Databse'"
oRs.Open strSQLStmt, oCN

Now you can read and write with:
Write:
ORS("Fieldname")="Your Value"
Read
VValue = ORS("Fieldname")



Connection for Access Database

Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source='Your Database';"
Set Aprs = New Recordset
Aprs.Open "select * from 'YourTable' Where 'Your search'", db, adOpenStatic, adLockOptimistic

0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 120 total points
ID: 8047678
is your database SQL server? in this case see "If connection to a remote server (via IP address):" from http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm#SQLClientManagedProvider
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!

 

Author Comment

by:jafari
ID: 8069435
Its ok,

But the Sql server on the web gives me permission to insert data from my stand alone vb application
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 8075216
you need to connect using a User ID and a Passord.
0
 

Author Comment

by:jafari
ID: 8078826
friends i want to connect my application to the server in such a way that when the user inserts the Database name , the app should fire a query in which all the table names and their respective fields (with primary key, data type)  are displayed.

can u hep me
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 8079393
select *
from sysobjects as so
inner join syscolumns as sc
on so.id = sc.id
where so.xtype = 'u'
0
 
LVL 49

Expert Comment

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

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

jafari, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

741 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