Author Topic: how do i connect a client till to a server using sql express 2005  (Read 14123 times)

yousufjam

  • Newbie
  • *
  • Posts: 21
Hello,
i have been trying to connect 2 computers together with the server running sql express, i managed to connect to database locally but i cannot connect the client to the server database. i tried everything in these forums but i just keep getting the same error.

can somebody kindly provide me with step by step instructions on how to configure the sql express and then connect to it, i will be eternally gratefull.

i used this string: data source=[server computer name]\SQLEXPRESS
(i did not create any password or change the instance name in sql express)

Jamil

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: how do i connect a client till to a server using sql express 2005
« Reply #1 on: December 17, 2012, 02:26:52 pm »
Hello Jamil. You should either create a SQL Server user account or enable a windows user account on server for the client connection. Local connection works without a password because it uses your local windows account to connect SQL server. The easiest configuration will be creating a SQL Server Login. It should be easily done with Management Studio for SQL Server 2005.

yousufjam

  • Newbie
  • *
  • Posts: 21
Re: how do i connect a client till to a server using sql express 2005
« Reply #2 on: December 18, 2012, 05:50:54 pm »
Hi Emre,
Thanks for such a speedy reply.
i have created a windows password, how do i enable windows user account on server and what connection string should i use.
i did not enable sa account, should i do this? thanks so much for your help and sorry if my questions are silly, i am new to sql server.

Jamil

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: how do i connect a client till to a server using sql express 2005
« Reply #3 on: December 18, 2012, 07:13:29 pm »
If you'll connect to server with windows account there is no need to add user id or password to connection string. If client account has required permissions on server it should just work fine. But setting it up correctly and configuring permissions might be tricky. As I've said on my previous post creating a SQL login and connecting with that SQL Server username and password will be easier. You can read more about the connection string configuration here http://www.sambapos.org/docs/doku.php/en/dbase/client_server_baglantisi_nasil_yapilir

yousufjam

  • Newbie
  • *
  • Posts: 21
Re: how do i connect a client till to a server using sql express 2005
« Reply #4 on: December 19, 2012, 04:04:37 pm »
Thanks so much emre,

i made progress, not when i start the sambapos on the client machine i get this error:

An exception occured while initialising the database. see the InnerException for details.
What did i do wrong?


yousufjam

  • Newbie
  • *
  • Posts: 21
Re: how do i connect a client till to a server using sql express 2005
« Reply #5 on: December 19, 2012, 04:17:04 pm »
Ok I got it to work finally!! yay!

it was either the server roles or user mapping in the login properties, i just ticked everything.

now i just need to find out how i can import my sql compact database to sql express