I want to connect a MSDE database exists in the desktop from Pocket pc 2003 application developed using vb.net. It is giving sql server not found error. It is working in the pocket pc simulater. But it is not working in the pocket pc device. Connection is also working sql server 2000 database. Please help me.Want to show us the connection string?
Might help...|||cs = "data source=mypc\test;initial catalog=test;user id=sa;persist security info=False;workstation id=mypc\test;packet size=4096"|||It's not listed here (and you should post the actual one) but are you supplying a password?|||Originally posted by Brett Kaiser
It's not listed here (and you should post the actual one) but are you supplying a password?
Not supplying the password
I am not supplying the password. I have used the following entries in the setup.ini file while installing the MSDE
[Options]
INSTANCENAME=TEST
SECURITYMODE=SQL
BLANKSAPWD=1
I think i no need a password here. I have also tried with password it is giving same problem. here the code...
Dim cnfordesktop As New System.Data.SqlClient.SqlConnection
'-----------------------
' Open the desktop connection
'-----------------------
Public Function OpenConnectionForDeskTop() As Boolean
Dim cnstr As String = ConnectionStringForDeskTop()
Try
cnfordesktop = New system.Data.SqlClient.SqlConnection(cnstr)
cnfordesktop.Open()
Catch e As SqlClient.SqlException
MessageBox.Show("Error Number: " & e.Number & ", Error Message: " & e.Message & ", Command: " & cnstr, "Database ", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)
Return False
End Try
Return True
End Function
'-----------------------
'close the connection
'-----------------------
Public Sub CloseConnectionForDesktopVM()
Try
cnfordesktop.Close()
Catch ex As Exception
End Try
End Sub
'-----------------------
'Set the connection string property
'-----------------------
Public Function ConnectionStringForDeskTop() As String
Dim cs As String = ""
cs = "data source=mypc\test;initial catalog=test;user id=sa;password=;persist security info=False;"
Return cs
End Function
Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts
Wednesday, March 21, 2012
Tuesday, March 20, 2012
Plz Give The Solution Within Hour
I have two Same Databases on two different machine.i developed report at first machine.it run successfully.when i copy the report to other machine which has different name and open it, on refreshing ,its prompt for database connection then i change the name of server,database name ,user id and password then press ok.
Then
System Processing............
System Processing............
System Processing............
System Processing............
System Processing............
System Processing............
System Hanged
then I press Alt+Ctll+Delete
to abort the procceesCheck the ODBC source on both machines, if report runs on machine a, but not machine b, it could be the ODBC names are mis-matched.|||Bro. V361 i am using OLEDB(ADO) for database connection.
Actually problem is that i have developed report with my Server name for eg.DB02.BUT at client side DB02 is obviously unknown.when client open my report in crystal report and press F5 ,sometime it prompt for parameters,and sometime it hangs,when it prompt for parameter,i press ok then it ask for database connection ,I enter the configuration accordingly.after that.....Dont ask...
Prbolem is How to replace my Server Name with Clint Server Name...|||Open report, go to database, set databse location, you should see the current database connection at the top, browse too or create the new connection at the bottom. You will need to click on the table names at the
top, find the table name in the bottom connection and click update. You will need to do this for all tables involved as well as any subreports. As long as your report is not based on a command, this should help.|||Thanks for your reply.
My problem has been solved.Connection Timeout property was set to 0 which means crystal report never prompt for database configuration and keep searching for server name which causes computer to be hanged.
Then
System Processing............
System Processing............
System Processing............
System Processing............
System Processing............
System Processing............
System Hanged
then I press Alt+Ctll+Delete
to abort the procceesCheck the ODBC source on both machines, if report runs on machine a, but not machine b, it could be the ODBC names are mis-matched.|||Bro. V361 i am using OLEDB(ADO) for database connection.
Actually problem is that i have developed report with my Server name for eg.DB02.BUT at client side DB02 is obviously unknown.when client open my report in crystal report and press F5 ,sometime it prompt for parameters,and sometime it hangs,when it prompt for parameter,i press ok then it ask for database connection ,I enter the configuration accordingly.after that.....Dont ask...
Prbolem is How to replace my Server Name with Clint Server Name...|||Open report, go to database, set databse location, you should see the current database connection at the top, browse too or create the new connection at the bottom. You will need to click on the table names at the
top, find the table name in the bottom connection and click update. You will need to do this for all tables involved as well as any subreports. As long as your report is not based on a command, this should help.|||Thanks for your reply.
My problem has been solved.Connection Timeout property was set to 0 which means crystal report never prompt for database configuration and keep searching for server name which causes computer to be hanged.
Subscribe to:
Posts (Atom)