Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts

Saturday, February 25, 2012

RDA Pull Fail

I try to pull data from SQL 2005 Express Edition to SQL Mobile 5.0, with Visual Basic 2005.
It keep prompt me the error Native Error:

System.Data.SqlServerCe.SqlCeException was unhandled
HResult=-2147024809
Message="An error has occurred on the computer running IIS. Try restarting the IIS server."
NativeError=28022
Source="Microsoft SQL Server 2005 Mobile Edition"
StackTrace:
at System.Data.SqlServerCe.NativeMethods.CheckHRESULT()
at System.Data.SqlServerCe.SqlCeRemoteDataAccess.Pull()
at PDA2007.PULLPUSH.btn_pull_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at PDA2007.PULLPUSH.Main()

Below is my coding :

Private Sub btn_pull_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles btn_pull.Click


Const gRemoteProvider = "Provider=SQLOLEDB.1;Persist Security

Info=False; " & _


"User ID=dmspda;Password=dmspda;Initial

Catalog=dmspda;Data Source=INSPIRON6000"


Const gInternetURL = "HTTP://192.168.1.3/Sync/SSCESA30.DLL"


Const gInternetLogin = "INSPIRON6000\IUSR_INSPIRON6000"


Const gInternetPwd = ""


Dim rda As SqlCeRemoteDataAccess



rda = New SqlCeRemoteDataAccess


rda.LocalConnectionString = "Data Source=\My Documents\pda.sdf"


rda.InternetUrl = gInternetURL


rda.InternetLogin = gInternetLogin


rda.InternetPassword = gInternetPwd



rda.Pull("pda_uom", "Select * from pda_uom", gRemoteProvider,

RdaTrackOption.TrackingOn)



End Sub


I have been refer to a lot of website and read articles, help forum, have try to disable Firewall, allow HTTP and HTTPS, uninstall anti-virus system. I have no idea, what is this problem and how to solve it ? If you face same problem before, hope can give some comment here, appreciate it!

Developed Machine:
* XP Pro S2
* SQL Server 2005 Express Edition
* Visual Studio 2005

Device :
* SQL Mobile 2005
* Window Mobile 5.0



Hullo xiaoytan

I have facing the same error as u faced, could u solved this pbm, then please let me know , how to do it ?

Thank u.

Monday, February 20, 2012

RAS error no 756

RAS error no 756

If i m trying to connect my remote server from the dos prompt
by giving the foll syntax ie

rasdial <connection> <user> <password>

its getting connected to my remote server.
but i m facing a problem while i m giving the syntax in qa

xp_cmdshell 'rasdial <connection> <user> <password>'

error detail i m getting is

'Remote Access error 756 - This connection is already being dialed.'
even though there is no connection existing.

could u pl let me know what could be the reason.

On the other side
If i m trying to disconnect after a manual connect from the query analyzer
its working fine ie

xp_cmdshell 'connectionname/disconnect'

immidiatly after this , if i m trying to connect through qa i m getting
the same error no ie 756.
even though there is no connection existing.

is there any command or syntax to know through qa
if there is any existing connection disconnect (RAS Connection) ?In your place, I would be inclined to modularize the approach more (at least to identify your issues, as RAS has been changed between different OS and service packs).

In other words, rather than:

xp_cmdshell 'rasdial <connection> <user> <password>'
xp_cmdshell 'connectionname/disconnect'

Implement something like:

xp_cmdshell 'c:\MyConnectBatchFile.cmd'
xp_cmdshell 'c:\MyDisconnectBatchFile.cmd'

That should allow you to manipulate your OS commands separately. Once you have the OS components operating as desired for your requirements, you can look at imbedding everything directly into the xp_cmdshell execution string again.|||Thanx for the mail.

MyConnectBatchFile.cmd how to use this command can u pl explain me better.

I m using win-2k server.

xp_cmdshell 'c:\MyConnectBatchFile.cmd'
xp_cmdshell 'c:\MyDisconnectBatchFile.cmd'|||Originally posted by ranjan
Thanx for the mail.

Q1 MyConnectBatchFile.cmd how to use this command can u pl explain me better.

I m using win-2k server.

xp_cmdshell 'c:\MyConnectBatchFile.cmd'
xp_cmdshell 'c:\MyDisconnectBatchFile.cmd'

A1 Yes, I think so (see below, later).

Use Notepad to create a new text file. Copy and paste (or retype) everything normally typed into a "DOSprompt command line window" into the text file. Rename the file something like 'c:\MyConnectBatchFile.cmd'.

Verify that the MyConnectBatchFile.cmd functions correctly (as you expect) by running it interactively (double clicking on it).

Note: A pause or other interactive dos command left in a .cmd file (for testing, etc.) will cause exec xp_cmdshell 'c:\MyConnectBatchFile.cmd' to appear to 'hang'. It will never get input to continue, and the process will then have to be killed (in taskmanager)!!

Once MyConnectBatchFile.cmd functions as expected interactively; call it from QA, using xp_cmdshell. For example:
exec xp_cmdshell 'c:\MyConnectBatchFile.cmd'