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
What do you know about user forms.
what is the Difference between Tabletype and Snapshot?
Difference between Tabletype and Snapshot?
Difference between ActiveX Control and Standard Control.
What's the difference between MODAL and MODELESS forms?
What is ODBC Direct and Microsoft Jet Database Engine ?
what is the Difference between Linked Object and Embedded Object?
What is the-use of property page Wizard in ActiveX Control?
State about the different types of visual basic data?
What is the use of Data Form Wizard?
How do I add a form in visual basic?
What is ado data control in vb?
What are the types of Error? In which areas the Error occurs?
What is ado in vb?
Why visual basic is used?