Thursday, May 31, 2007

My Solution : Failure to connect to SQL Server with provided connection information. SQL Server4 does not exist, ...

Error: Failure to connect to SQL Server with provided connection information. SQL Server4 does not exist, access is denied because the IIS user is not a valid user on the SQL server, or the password is incorrect

Solution:
1. After creating your publication on the management studio, add the user IUSR_ in the security->login folder
Important: you don't have to create that user, this user already exist, so look it up under advanced search!!
2. Rightclick on that user and choose properties.
3. Under usermappings check the box of the database you would like to access, then click ok.
4. Rightclick on your publication and choose properties.
5. Select publication access list an add the
IUSR_ user and click ok.
6. Rightclick on your publication, select view snapshot status and generate the snapshot.
7. Execute the web synchronisation wizard the subscription wizard.
this wizard creates the virtual directory for the webaccess, choose annonymous access.
8. Execute the subscription wizard and use windowsauthentication.

Reference:

Monday, May 28, 2007

.NET Compact Framework 3.5 is coming

.NET Compact Framework 3.5 is coming with next version of Visual Studio code named "Orcas".
Details can be found at http://blogs.msdn.com/netcfteam/archive/2007/01/28/net-compact-framework-3-5-included-in-orcas-january-ctp.aspx

Download the beta version from here

Sunday, May 27, 2007

Bluetooth Settings for PocketPC Devices


For Widcomm bluetooth stack based devices settings are

For BT InboundPort : [HKEY_LOCAL_MACHINE\SOFTWARE\Widcomm\BtConfig\Services\0001]
For BT OutboundPort : [HKEY_LOCAL_MACHINE\SOFTWARE\Widcomm\BtConfig\Applications\0001]
For Bluetooth Mode Status : [HKEY_LOCAL_MACHINE\SOFTWARE\Widcomm\BtConfig\General\StackMode]



For Microsoft bluetooth stack based devices settings are

For BT InboundPort : [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\Services\0001]
For BT OutboundPort :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\Applications\0001]
For Bluetooth Mode Status :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\General\StackMode]

Friday, May 18, 2007

My Solution for "An error has occurred on the computer running IIS. Try restarting the IIS server" Error

I got this error while I was working on SQL Server mobile and Merge Replication. The solution was working fine initially but later on I switched my emulator from WM 5 to WM 6 & I got this error. I tried the same solution back on WM 5 , but it gave me same error, I tried to solved it by providing network credentials but it didn't solved my problem. So used my (or I'll say everyone's ) most effective weapon to solve ambiguous errors i.e. System reset :). I restart my machine & the solution start working fine. Magic!!!
I donno reason behind this, but it served my purpose.

Monday, May 14, 2007

Determine if a table exist in SQL Mobile database.

If you wants to find out that whether a particular table exist in a SQL Mobile database, here is a simple solution.
Fire the following query from COmmand.ExecuteScalar.
SELECT count(*) FROM INFORMATION_SCHEMA.TABLES where TABLE_NAME = @TableName

If it returns 1; it means the table exists in the database & if it returns 0 then it means the table doesn't exists.

Wednesday, May 2, 2007

The Easiest and quickest way to create a ConnectionString

Creating a connection string is always a complicated task - providing credentials, rights & all. But few years ago one of my colleagues told me a quick way to create a connection string & I guess it is the easiest way.
The steps are
1. Create a new file by right clicking on desktop; from context menu select New then select Text File (you can select any file).
2. Rename the extension of this file to "UDL"; in this case it would be from "txt" to "udl".
3. Neglect the rename message and save the file. You can see a new icon.
4. Open this file by double clicking on the icon; you can see the Providers, connection tab. So specify your server, Provider and database name and click "Ok".
5. Now Open this file in text box and you can see the connection string for the database you have selected.