How to connect to a sql server using odbc_connect()?



How to connect to a sql server using odbc_connect()?..

Answer / Ranveer Kumar Singh

"To connect to a SQL Server using odbc_connect(), follow these steps:
1. Install an ODBC driver for SQL Server on your machine if it's not already installed.
2. Configure the ODBC data source name (DSN) using the Data Source Administrator tool.
3. In your PHP script, use odbc_connect() to establish a connection with the specified DSN as follows:n`$conn = odbc_connect('DSN', 'username', 'password')`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How to create an identity column?

1 Answers  


What is unique key constraint?

1 Answers  


what is IDE,DMV in sql server?

1 Answers   Value Labs,


What is an execution plan? How would you view the execution plan?

1 Answers  


What is the difference between join and inner join?

1 Answers  


what is the out put of below queries? a. select * from Emp where null = null; b. select * from Emp where 1=1;

13 Answers   Patni,


What does normalization do to data?

1 Answers  


What are translations and its use? : sql server analysis services, ssas

1 Answers  


How make remote connection in database?

1 Answers  


What is the difference between varchar and nvarchar?

1 Answers  


how can u select the Distinct values in the table, table having 20 columns , i want all columns

2 Answers  


What is a Linked Server?

1 Answers  


Categories