Jump to content

sql express database & php


Recommended Posts

hi friends.

i created a sqlexpress database with vs(visual studio2008) and now i want connect to it with php.

but thats cant connected.i have this error

Connection could not be established.
Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'MANSIN\mansin-pc'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'MANSIN\mansin-pc'. ) [1] => Array ( [0] => 42000 [SQLSTATE] => 42000 [1] => 4060 [code] => 4060 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open database "sch" requested by the login. The login failed. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open database "sch" requested by the login. The login failed. ) [2] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'MANSIN\mansin-pc'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'MANSIN\mansin-pc'. ) [3] => Array ( [0] => 42000 [SQLSTATE] => 42000 [1] => 4060 [code] => 4060 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open database "sch" requested by the login. The login failed. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open database "sch" requested by the login. The login failed. ) ) 

how to can i solve the problem?

 

best regards.

Link to comment
Share on other sites

hi,

yes, i am installed sqlserver drivers.

for useing sqlserver in php i attached 2 extention.

extension=php_pdo_sqlsrv_53_ts_vc9.dll
extension=php_sqlsrv_53_ts_vc9.dll

my xampp worked propery,i havent problem in drivers & php configuration.

i have another database (sqlexpress) and i can work with it now,but this created with "full convertor software".

but when i create sqlexpress database with vs2008 thats not working.

when i use sql managment studio (log in with express) for show all express database , i cant see new database (created with vs2008).but thats created successfull(can i see with windows).

now how to can i solve this problem?

 

best regards.

Edited by mehdi_safa
Link to comment
Share on other sites

Why are you using Visual Studio to create databases? Its only just registered what you're doing. 

 

Use SQL Server Management Studio to administrate the database. Its free to download and is built specifically to manage SQL Server.

Link to comment
Share on other sites

thanks for attention.

i have sqlserver database backup files(.bak) and this files are for schools (this bak files created with c# application ) and are in school(s) .but schools manager cant work with sql managment studio,i want create a c# app for restore .bak files and convert to express editition and they(school managers) can upload new files to website .(new files are students scores). :happy-04: :happy-04: :happy-04:

Edited by mehdi_safa
Link to comment
Share on other sites

Good luck with that! You've got to read Microsofts bak file, how you do that I've no idea, I don't even know if its possible unless you know how it was created which I doubt you do.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.