Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conectivity 1

Status
Not open for further replies.

infoReceiver

Programmer
Sep 22, 2003
8
IN
Hai,
I am new to VB Programming.I am able to connect database created in the MS Access (*.mdb) to the VB form.
But my problem is:
I have created simple table in Oracle SQL*Plus. Corresponding to that table i have created a form in VB.
Now i don't how to get connectivity between vb and SQL database.
Please guide me.

bye
 
how are u connecting, ie what method are u using? ADO, DAO, ODBC or what?

Known is handfull, Unknown is worldfull
 
For connecting MS Access database to VB i have used both ADO & DAO
But i don't how get connect sql database to VB.
if it is possible thr'o ODBC,Please inform me...
 
its possible with ADO itself, and also via ODBC, why dont u use the ADODC Control?

Known is handfull, Unknown is worldfull
 
If your using ADO all you should need to do is change the connection string to allow for a SQL server connection and the rest of the code should remain the same.
 
So now i am using ADODC-
The settings are as follows:
For the connectionstring i have assigned- 'MS OLE DB provider for SQL Server'
For the RecordSource i have assigned - '8-adCmdUnknown'.

And for the text field the settings are as follows:
DataSource=name to the ADODC
DataFormat=General
For DataField = I AM NOT ABLE TO ASSIGN THE COLUMN NAME(field name) OF THE TABLE.If i assign DataField = Name,I will get error as "Invalid object name 'Name'"

please tell me the settings for sql connectivity....
 
So now i am using ADODC-
The settings are as follows:
For the connectionstring i have assigned- 'MS OLE DB provider for SQL Server'
For the RecordSource i have assigned - '8-adCmdUnknown'.

And for the text field the settings are as follows:
DataSource=name to the ADODC
DataFormat=General
For DataField = I AM NOT ABLE TO ASSIGN THE COLUMN NAME(field name) OF THE TABLE.If i assign DataField = Name,I will get error as "Invalid object name 'Name'"

please tell me the settings for sql connectivity....







 
Is the backend database in ORacle? I am asking since you said you created the table in Oracle SQL Plus. If so, you will need to use the Oracle driver rather than the SQL server driver. Also make sure the account you use to log in with has permissions to the table or stored proc.
[rainbow][rainbow][rainbow][rainbow]

Sam
 
There is a fairly comprehensive list of ADO connection strings here:

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top