CONNECTIVITY OF SQL 2000 + VB USING ODBC.
steps i Follow-
1) Go to Control panel-->Admintrative Tools-->Double -click
Data sources(ODBC)-->click Add button-->I choose SQL server
(last option), Is it right or wrong option for connecting
to SQL 2000.Then a new screen appears Create a New
dataSource-->in name textbox,we can write anyname--Right or
wrong. suppose i enter sonia, & my server name is .,so I
enter . in server & click next button-->On the Next screen
i have checked the option With Sql server authentication--
>Login Id-sa, Password-->Blank-->Click next button-->Next--
>Finish-->Then I click on button Test Data source-->Mesage
Comes TESTS COMPLETED SUCCESSFULLY-->OK-->OK-->Ok.

These steps we have to do or not for Connectivity using
ODBC.
If yes,then what after these steps we have to do??Plz reply
me early ??Thx in advance.

Answer Posted / sri

You also can create the DSN Programatically as follows
Creating DSN Programatically

Private Sub ConfigDSN()
On Error Resume Next
#If Win32 Then
Dim intRet As Long
#Else
Dim intRet As Integer
#End If
Dim strDriver As String
Dim strAttributes As String
Dim msmdbpath As String


' sdPathName = App.path & "\PROJECT.mdb"
strDriver = "Microsoft Access Driver (*.mdb)"
strAttributes = "SERVER=" & Chr$(0)
strAttributes = strAttributes & "DESCRIPTION=OJAL Data
Souce Name" & Chr$(0)
strAttributes = strAttributes & "DSN=INT" & Chr$(0)
strAttributes = strAttributes & "DATABASE=" &
sdPathName & Chr$(0)
strAttributes = strAttributes & "MaxBufferSize=512" &
Chr$(0)
strAttributes = strAttributes & "PageTimeOut=5" & Chr$(0)
strAttributes = strAttributes & "DBQ=" & sdPathName &
Chr$(0)
intRet = SQLConfigDataSource(vbAPINull,
ODBC_CONFIG_DSN, strDriver, strAttributes)
End Sub

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you know about user forms.

629


what is the Difference between Tabletype and Snapshot?

1520


Difference between Tabletype and Snapshot?

1480


Difference between ActiveX Control and Standard Control.

2122


What's the difference between MODAL and MODELESS forms?

1021






What is ODBC Direct and Microsoft Jet Database Engine ?

1861


what is the Difference between Linked Object and Embedded Object?

1771


What is the-use of property page Wizard in ActiveX Control?

1540


State about the different types of visual basic data?

547


What is the use of Data Form Wizard?

1492


How do I add a form in visual basic?

509


What is ado data control in vb?

527


What are the types of Error? In which areas the Error occurs?

1634


What is ado in vb?

512


Why visual basic is used?

527