Apparent it is not possible to change the height of a TextBox. But I want to display two or three lines of text. Which control can I use and/or should I use? Regards patrick
pat270881
Posts
-
TextBox - What else? -
UniqueidentifierThank you very much, now it works! patrick
-
UniqueidentifierHello, I want to save the name of the company in the textBox2. The problem which occur is with the JobId. I will get the JobId number from a previous page as a string. Here I have quoted an example JobId. (the JobIds are saved in the database as uniqueidentifier). The Problem occurs in the ExecuteReader. I think it concerns that the parameter @JobId is of type uniqueidentifier and the the quoted jobId here is from type string. So it occurs a Data conversion failed. error. jobId = "D4DF269F-F9FB-4C88-A005-11C98B38818A"; this.dataSource = "\\Program Files\\MobileHelpDesk.sdf"; this.strConn = "Data Source = " + dataSource; this.connection = new SqlCeConnection("Data Source = " + dataSource); SqlCeCommand command = new SqlCeCommand(); command.Connection = connection; command = connection.CreateCommand(); command.CommandText = "SELECT c.CompanyName, c.ContactLName FROM Client c INNER JOIN JobDescription p ON p.EmailClient = c.Email WHERE p.JobId = ?"; command.Parameters.Add( "@JobId", jobId); connection.Open(); drdrDB = command.ExecuteReader(); while (drdrDB.Read()) { textBox2.Text = drdrDB["JobId"].ToString(); } drdrDB.Close(); connection.Close(); Does anybody know how can I solve this problem or parse the jobId string in the corresponding type?? or is there another error? But the Select String is correct, I tried it in VS.NET. thx patrick
-
FileSharing violation.Hello, I am sure that I have open only one connection to my SQL Server CE Database but I worked then with another project which also has opened a connection to the same SQL Server CE Database file, but I closed this connection. Now when I want to execute my previous project the File Sharing violation. A different preocess might be using the file. How can I ensure that no more process will use the file?? I also looked in the settings but there is nothing more. patrick
-
Tab PaneBut in the Object Browser is not quoted which event occurs when I go from one tab pane to another tab pane..?? - and I also did not find a background property for the tab pane? patrick
-
Tab PaneHello, In addition to that how can I find out what tab pane of the tab control is currently selected? Regards patrick
-
Select StatementMr. Stewart I finally fixed the problem! The problem was in the SQL Query, very trivial. Thank you very much for your support!! regards patrick
-
JOINOkay, thank you, now it works! Thx patrick
-
JOINHello, I have two tables From one table i want to retrieve two values and from the other also two values. And the condition is when the one value of the first table has a certain value. (In my case EngineerUserId). The problem is with my current statement the rows will be displayed two times. Have anybody know an idea? My current statement looks as follows: "SELECT p.JobId, p.Priority, c.CompanyName, c.ContactLName FROM JobDescription p INNER JOIN Client c ON p.EngineerUserId = ? ORDER BY p.Priority"; thx patrick
-
Select StatementNo, I have checked all these things. There exists only one SQL connection. And where and for which purpose should exist a connection between the SQL Server and the SQL Server Ce. I have a connection between the two only when I press the synchronize button. when I do the same with this code: string EngineerUserId = "hattl70"; SqlCeCommand cmndDB = new SqlCeCommand(); cmndDB.Connection = connection; cmndDB.CommandText = "SELECT JobId, Priority, Problem, EmailClient" + "FROM JobDescription" + "WHERE EngineerUserId=" + EngineerUserId; cmndDB.ExecuteNonQuery(); dataSet = new DataSet(); daptJobs = new SqlCeDataAdapter(selectCommand, strConn); daptJobs.Fill(dataSet,"Jobs"); dtabJobs = dataSet.Tables["Jobs"]; dgridDisplay.DataSource = dtabJobs; MobileHelpDesk.UtilGUI.AddCustomDataTableStyle(dgridDisplay,"Jobs"); this.connection.Close(); I got not the file violation, but the error "There Was an error parsing the query" Minor Err:: 25501. I do simply what know what else I should try...?:(:(
-
Select StatementAnd i have no more connection open, only this one. (Because the error indicates that there is another process which has access to the file)=
-
Select StatementThe first time I wanted it to do it that way, but one has quoted me that I can do it with this parameter. Now I implemented it like in the example: string EngineerUserId = "hattl70"; SqlCeConnection conn = new SqlCeConnection(strConn); conn.Open(); SqlCeCommand command = conn.CreateCommand(); command.CommandText = "SELECT JobId, Priority, Problem, EmailClient FROM JobDescription WHERE EngineerUserId = ?"; command.Parameters.Add( "@EngineerUserId", EngineerUserId); command.Prepare(); command.ExecuteNonQuery(); dataSet = new DataSet(); daptJobs = new SqlCeDataAdapter(selectCommand, strConn); daptJobs.Fill(dataSet,"Jobs"); dtabJobs = dataSet.Tables["Jobs"]; dgridDisplay.DataSource = dtabJobs; MobileHelpDesk.UtilGUI.AddCustomDataTableStyle(dgridDisplay,"Jobs"); But it would have wondered me very much if it would work.:(:( No the following error occurs: There is a file sharing violation. A different process might be using the file. Minor Err.: 25035 Is it really possible that anything else went wrong? patrick
-
Select StatementReally, that specification of that field is NVarChar(50) - I can send you the tables, if you want. With direct mean, if I write it in that way SqlCeCommand cmd = new SqlCeCommand(@" SELECT Priority, Problem, EmailClient FROM JobDescription WHERE EngineerUserId = 'hattl70' ORDER BY Priority"); cmd.Connection = new SqlCeConnection( strConn ); dataSet = new DataSet(); daptJobs = new SqlCeDataAdapter(cmd); daptJobs.Fill(dataSet,"Jobs"); dtabJobs = dataSet.Tables["Jobs"]; dgridDisplay.DataSource = dtabJobs; MobileHelpDesk.UtilGUI.AddCustomDataTableStyle(dgridDisplay,"Jobs"); When i quote a certain value of the field, for example hattl70 than the corresponding rows are display without an error. Can you explain that yourselves??:( Believe me I tried so much, nearly the whole day. regards patrick
-
Select StatementIs it in any wise possible that this error causes by the replication, because I created the tables on the desktop and replicated it to the SQL Server CE on my PocketPc. Maybe that the NVarChar was in that way converted in another datatype or anything else?? regards patrick
-
Select StatementYes i have checked all these things, like the type of the paramter and the size. And I wrote it in the previous posting - The code work without problems, when I quote directly the value, for example hattl70, so it cannot be anything with the connection because otherwise the statement with the direct value would also not work. regards patrick
-
Select StatementI know that i spelled all my fields right. I also use Replication, can this causes the error??? But i do not use Identity property in the context of my Replication, the JobId is a uniqueidentifier. But I do simply not understand why the replication should cause this problem, because when I quote directly a value in the Where Statement - for example the value hattl70, then no error occured...:(( regards patrick
-
Select StatementThe following error occurs: Error #1 of 1 Error Code: -2147217900 Message: There was an error parsing the query. [Token line number, Token line offset,, Token in error,,] Minor Err.: 25501 Source: Microsoft SQL Server 2000 Windows CE Edition Numeric Parameter: 3 Numeric Parameter: 49 Error Parameter: @EngineerUserId As is said it must lie with this Where Statement. Do you have further ideas? - I alread checked your remarks from the previous posting regards patrick
-
Select StatementMr. Stewart i already tried the version with parameter, but the same error occurs again which i mentined in a previous posting. I wrote the code in that way: (UserEngineerId is EngineerUserId). SqlCeCommand cmd = new SqlCeCommand(@" SELECT Priority, Problem, EmailClient FROM JobDescription WHERE EngineerUserId = @EngineerUserId ORDER BY Priority"); SqlCeParameter id = cmd.Parameters.Add("@EngineerUserId", SqlDbType.NVarChar, 50); id.Value = "hattl70"; dataSet = new DataSet("Jobs"); cmd.Connection = new SqlCeConnection( strConn ); daptJobs = new SqlCeDataAdapter(cmd); daptJobs.Fill(dataSet,"Jobs"); dtabJobs = dataSet.Tables["Jobs"]; dgridDisplay.DataSource = dtabJobs; The problem ist that i could no other error then the Where statement because if i don't use this statement the code works without problems. I do not understand this phenomen...:(? regards patrick
-
Select StatementNo more ideas???:(:( patrick
-
Select StatementOkay the error notification looks as follows: Unexpected Error in MobileHelpDesk.exe SqlCeException SqlCeCommand::InitializeCommand+0xf9 SqlCeCommand::ExecuteCommand+0xa SqlCeCommand::ExecuteReaderInternal+0x30 SqlCeCommand::ExecuteReader+0x13 SqlCeCommand::System.Data.IDbCommand.ExecuteReader+0x7 DbDataAdapter::Fill+0x37 DbDataAdapter::Fill+0x85 DbDataAdapter::Fill+0x11 Are anybody able to see with the help of this error what went wrong??:( best regards patrick