Showing posts with label platform. Show all posts
Showing posts with label platform. Show all posts

Sunday, February 19, 2012

Connecting Database Engine (SQl server 2005 file .*mdf) from Win CE 5.0 platform

Is this possible to connect do the Database Engine (on sql server 2005 on XP platorm - file *.mdf (not mobile *.sdf)) from win CE 5.0?

I tried to do this :

ConnectionStringSQLServerCE = "Data Source=WORK_STATION\\SQLEXPRESS;Initial Catalog=dbMachines;Integrated Security=False;Password=Panel;User ID=Panel";

SqlCeConnectionCE = new SqlConnection(ConnectionStringSQLServerCE);

SqlCeConnectionCE.Open();

but I catch error:

catch (PlatformNotSupportedException ex)

?PlatformNotSupportedException”

I noticed that I see server because when I use:

ConnectionStringSQLServerCE = "Data Source=WORK_STATION\\SQLEXPRESS";

zwraca b??d typu

catch (SqlException ex)

“Login failed for user ''. The user is not associated with a trusted SQL Server connection.”

I used

using System.Data.SqlClient;

from Compact Framework 2.0 under Visual Studio 2005 Device Application Windows CE 5.0

can anyone help me?

Yes, it is possible to connect to SQL Server 2000/2005, SQL Express and MSDE from NETCF application using SQL Client.

PlatformNotSupportedException usually happens if particular device does not support locale database it in. For example, if your database uses Polish collation, you'd need device localized in Polish in order to use it. Alternatively you could change database collation to one available on device.

As to connection issue, your server need to be properly configured and you should have functional network connectivity. Please see this for general troubleshooting:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=335660&SiteID=1

Tuesday, February 14, 2012

connect using perl (solaris platform)

I need to connect to Express edition of sql server installed on my machine, from perl (solaris platform). How should the connection string containing server, port, database etc look like ?

Can any one tell me how to find the *port number* that the local server is using.

|||

hi,

[quote user]

I need to connect to Express edition of sql server installed on my machine, from perl (solaris platform). How should the connection string containing server, port, database etc look like ?

please have a look at connection string samples..

Can any one tell me how to find the *port number* that the local server is using.

you can find the used port via SQL Server Configuration Manager.. select the SQL Server 2005 Network configurations node, which expands in several instances nodes.. select the appropriate instance node.. in the right pane, network protocols will be listed (in order to be available, the desired network protocol must be "enabled")...

select TCP/IP, rx click and access it's properties.. in the IP Addresses tab the used port will be listed.. if dynamic port is set, the instance is configured for dynamic assigned address and this value "could" change at next instance's startup as the instance will try, at it's startup, to get the old used port but it could be relocated to alternative one if the old port has been used (in the meanwhile) by other services.. in case of dynamic assigned ports, the SQL Server Browser, a service listening on port UDP 1434, is required to resolve remote connections..

the SQL Server Browser intercepts incoming connections and, after inspecting the local registry for the dynamic assigned port used by the instance, redirects the remote connection(s) to the appropriate port where the instance is listening on..

regards

|||UsHaving a single instance , use

netstat -a -b at the command prompt and look for the sqlservr.exe process

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

>> you can find the used port via SQL Server Configuration Manager

I could not find Configuration Manager in the management studio... where can I find that.

Thanks,

|||

hi,

it's not in Management Studio.. it's in the Microsoft SQL Server 2005 -> Configuration tools folder..

regards