Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.

Answers were Sorted based on User's Feedback



CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative..

Answer / deepak g

You have to use this DSN name (in your case it is sonia) in
your VB code wherever you wish to establish a connection
between your VB application and your SQL server 2K database.

Is This Answer Correct ?    5 Yes 1 No

CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative..

Answer / ramu.m

You have to create the DSN programatically by using some
code.

Is This Answer Correct ?    3 Yes 0 No

CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative..

Answer / vikram

You can used DSN Less Code here (which is more usefull
andimportant insteated of using DSN Coz when you run that
Application on Different PC, then you have to crete DSN
again..)
DSN Less Code for Connection MS ACCESS: or can connect any
db just need to change its provider:
dim con as new adodb.Connection
con.open "provider=microsoft.jet.oledb.4.0;" & "Data
Source= ur db path (there is no space btn Folder and File
Name)"

Is This Answer Correct ?    2 Yes 0 No

CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative..

Answer / vikas gupta`

you can try this for the perticular user in sql

'Set con = New Connection
'con.ConnectionString = "Provider=SQLOLEDB.1;Integrated
Security=SSPI;Persist Security Info=False;Initial
Catalog=account;Data Source=."
'con.Open
'Set rec = New Recordset
'rec.Open "select * from acc_details", con, adOpenDynamic,
adLockOptimistic

Is This Answer Correct ?    1 Yes 0 No

CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative..

Answer / abdul khadeer

After creating the DSN. You can use that DSN to access the
DATA.
For Example U Can Use the ADODB connection Object to
connect the Database by using ur DSN created.

For Example Say "Con" is object ADODB.Connection
Then open ur coonection.
Con.Open "MyDSN","UserName","Password"

Now the conection created, Now u can use this connection
object with ur record set oject to retirve the data

Is This Answer Correct ?    0 Yes 0 No

CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative..

Answer / 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

More Visual Basic Interview Questions

Explain the differences between ActiveX Dll and ActiveX Exe?

0 Answers  


What is the difference between Dim nCount as Integer vs Dim nCount% and when would you use each?

6 Answers  


How would you attach pictures in column headers of List View Control?

0 Answers   RRB,


1.What are the Feactures visual data manager 2.Short note on visual data manager 3.What is data control,its work,properties,methods 4.Needs for OLEDB in vb 5.LIst steps involved in generating christal report 6.What is a recordset 7.Diffrence between RDO and ADO 8.What is an Activex control 9.Advantages of ADO over data control 10.Diffrence between model and modeless form 11.What is the significance of debug window 12.Diffrence between single document and multiple document 13.Explain data report

0 Answers   Microsoft,


What do you mean by ADO?

5 Answers   King Indus Software Solutions, TCS,


What is Centralization Error Handling?

1 Answers  


How many types of Instantiations are there and what are they?

1 Answers  


What is the difference between change event in normal combobox and dbcombobox?

0 Answers  


How would you add elements in TreevieW Control.

0 Answers  


What is controls in vb?

0 Answers  


i want to retrive data from one spead sheet to another UI (workbook). control will search cell by cell for each row and load the data in another workbook(UI).

0 Answers   Nissan, TechSoft,


What is the latest version of visual basic?

0 Answers  


Categories