|
Hi Eddy,
I wanna clarify something.The database I would connect to is the database of the society I work in.As u know,maintenance societies try try to make easy its work:a technician uses the PDA to connect to the database of the society and finishs his work.The "big" database is a .mdf file.Something was not clear how can i connect to .mdf databse while i should connect to .sdf fine because I develop a mobile application??Is that possible
Also about the ip@,is it true what i did?I don't understand u statement really
is it a problem of Firewall????
Thanks
|
|
|
|
|
hI Eddy,
when trying to cradle my emulator,I can't install the virtual PC 2007 and getting this error:
Error 1335. The cabinet file 'product.cab' required for this installation is
corrupt and cannot be used..."
What can i do?
|
|
|
|
|
Goodmorning
Redownload Virtual PC and reinstall it, looks like your setup is corrupt. How is the Sql-query going?
I are Troll
|
|
|
|
|
Hi,
I redowload VPC2007 and install it but still the same error.The sql query goes fine.Tha problem is now in the cradling of the emulator.
Thanks
|
|
|
|
|
Hi
Thanks I cradled my emulator.The Emulator must be running to be able to cradle it.
When should I uncradle my emulator???
When trying to install windows mobile device center,it failed.Should i connect a real device to be able to install this tool???
How can I get the IP number that is used for my device and PC for this TCP/IP connection??????
Thanks a lot for u clarification
Marwen
Smile
|
|
|
|
|
Tunisien86 wrote: When should I uncradle my emulator???
That's out of my league; cradling the iPaq was a matter of inserting the USB-cable, never tried it on the emulator.
Tunisien86 wrote: When trying to install windows mobile device center,it failed.Should i connect a real device to be able to install this tool???
That might be possible; some applications require the real thing and won't work with the emulator.
Tunisien86 wrote: How can I get the IP number that is used for my device and PC for this TCP/IP connection??????
The IP-adress of the mobile device can be retrieved using this[^] snippet (scroll to the end), the IP-adress of Sql Server should be already known.
I are Troll
|
|
|
|
|
don't use
catch (Exception ex) {
MessageBox.Show(ex.Message);
}
as it may hide a lot of useful information.
Instead use
catch (Exception ex) {
MessageBox.Show(ex.ToString());
}
at least as long as it is not working properly all the time.
|
|
|
|
|
Hi Luc,
I made the changement u ask but the exception still.I wanna clarify that I wanna connect to my database .mdf and not .sdf.Something still not clear in my mind why should i use .mdf database or I work a mobile application so .sdf database required??,
Thanks for u contribution
|
|
|
|
|
Tunisien86 wrote: but the exception still
what did you expect? it does not make the exception go away, it makes you get more information from it, so you have a better chance at understanding what goes wrong and where.
|
|
|
|
|
Is the remote instance really 192.168.1.4 or is it 192.168.1.4\SQLExpress? By default SQLExpress databases run under a SQLExpress instance, and this is what you need to connect to.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hello,
I have an sql server 2005 standart Edition and not express.A snapshot of my sqlexception is available at this link http://yfrog.com/iycaptureawj[^]
Thanks
|
|
|
|
|
Ah the joy of developing for mobile!
We can't read the full exception (your screen is too small).
Put a breakpoint at the exception statement, and examine the 'ex' variable when the expression occurs.
|
|
|
|
|
Hi Michel,
when running the exception is :
NULLREFERENCEEXCEPTION IS UNHANDLED
Null ReferenceException
and it point to this statement of my code:
dr.Close();
Thanks
|
|
|
|
|
No, that's another exception. It happens because your try block never executed succesfully.
put a breakpoint at MessageBox.Show(ex.Message);
and look at the value of ex then (with the debugger)
|
|
|
|
|
Hi Michel,
The same appears as i wrote last time,same exception expression
thanks
|
|
|
|
|
If I follow the code in the article he refers to, he would have dumped the instance browser, and locked SqlExpress to port 1433.
|
|
|
|
|
Try changing your connection string to
Data Source=192.168.1.4,1433;Network Library=DBMSSOCN;Initial Catalog=GMAO;User ID=sa;Password=sa
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi Pete,
I changed but the sqlexception still:
Unknown connection option in connection string: network library.
thanks
|
|
|
|
|
Hi guys,
I depass the problem finally of the connection to the server due to the DATABASE FILE's ATTACHMENT.
Still now the problem in the filling of my combobox.In fact,no exception appears so connection to server works well.In other hand,nothing is added to my combobox.
I try to replace my sqldatareader by sqldataset but still the same thing:
private void Form6_Load(object sender, EventArgs e)
{
string sConnection = "Data Source=127.0.0.1,1433;Persist Security Info=True;Initial Catalog=GMAO;User ID=sa;Password=sa";
string sSQL = "SELECT com FROM energie; ";
SqlConnection conn = new SqlConnection(sConnection);
SqlCommand comm = new SqlCommand(sSQL, conn);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
SqlDataReader dr = null;
try
{
comm.Connection.Open();
da.Fill(ds, "SQL Temp Table");
foreach(DataRow d in ds.Tables[0].Rows)
comboBox1.Items.Add(d.ToString());
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message);
return;
}
dr.Close();
comm.Connection.Close();
}
How do I depass that???
Thank u in all cases
I am really sooooooo happy
|
|
|
|
|
I want to fill in dictionary from table C#
thank you for your idea .
|
|
|
|
|
|
be more clear
EASY COME EASY GO
|
|
|
|
|
Then I expect you will wish to use this class[^].
It's time for a new signature.
|
|
|
|
|
I hate classes. They are boring.
|
|
|
|
|
You've posted the same question (badly) three times now. Would you please stop.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|