|
That will take a lot time of yours 'cause you need to make custom control or need to use third party control for that, And it's time consuming and task of R&D.
If design doesn't matter at all then you can achieve same thing using TextBox with Button outside, Your cell can contain multiple control there's not any restriction to only one.
|
|
|
|
|
no,I'm obligated with that design,thanks anyway.
Regards,
ahmad115
|
|
|
|
|
When I google the topic I got many suggestions like this one: http://blogger.nilanka.net/2010/08/split-web-application-into-multiple.html
Is this the only way to do it? We have a big Web application project (ASP.NET 3.5) and we use VS2008. Does VS2010 have any support for splitting a web app into multiple projects or do we have to do this workaround?
_____________________________
...and justice for all
|
|
|
|
|
d00_ape wrote: Does VS2010 have any support for splitting a web app into multiple projects or do we have to do this workaround?
You'll have to split it yourself; Visual Studio cannot "guess" what pages make up a (child) project.
I are Troll
|
|
|
|
|
Ok, then I'll give it a try!
_____________________________
...and justice for all
|
|
|
|
|
in my application i try to identify if the sql express server is running in a remote pc, before starting my local service.
i use servicecontroller class and it gives the status as running, but through my service when i'm trying to access the DB in that sql server it returns the DB is not there, i used a thread sleep and then tried , it worked well then.
so seems to be there is a problem with sql service status and the real starting , is there any solution i can do instead of thread sleep.
|
|
|
|
|
I doubt ServiceController is a good idea.
Some reasons why it isn't a good idea.
- In a standard data center set up box A is not going to have permission to access the database box.
- Detecting that the service is running doesn't diagnose all possible failures.
The simple solution is to just do a do nothing query like the following
select 1
A better one might be to verify that at least one of your tables exists, but still a do nothing query like the following.
select 1 from mytable where 1=0
|
|
|
|
|
thanx... If the sevicecontroller is not a good solution is there any other class that i can use instead of it.
thanx in advance.
|
|
|
|
|
prasadbuddhika wrote: If the sevicecontroller is not a good solution is there any other class that i can use instead of it.
That doesn't make sense.
If you need to insure that a remote service is up AND you have permissions to access services then you would use ServiceController.
Expanding on what I already said.
- In a standard data center set up you will not have those permissions.
- Normally in any client server (database) set up it is outside the problem domain of the application to verify that the database service is running. It doesn't matter if the service is running. What matters is if the database is accessible.
- Not all failure scenarios can be verified using ServiceController. You could very well find that the service is in fact up but be unable to connect because your app has permissions to access the service but doesn't have permission to connect.
|
|
|
|
|
Visual Studio 2005, using SQL Express, I have stored SQL procedure to insert a row into my database. The return code from ExecuteNonQuery is 1 indicating a row was added, but when I check my database, there is no new row. When I run the procedure from the IDE, it inserts a row.
When debugging I do get Method may only be called on a type for which Type.Is Generic is true.
Here is the code block
using (SqlConnection conn = new SqlConnection( sqlConnection1.ConnectionString))
using (SqlCommand cmd = new SqlCommand("dbo.insertIntoCustomerTable"))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@companyName", ""));
cmd.Parameters.Add(new SqlParameter("@unitSection", ""));
cmd.Parameters.Add(new SqlParameter("@streetAddress", ""));
cmd.Parameters.Add(new SqlParameter("@city", ""));
cmd.Parameters.Add(new SqlParameter("@zip", ""));
cmd.Parameters.Add(new SqlParameter("@buissnessContactName", ""));
cmd.Parameters.Add(new SqlParameter("@buissnessContactPhone", ""));
cmd.Parameters.Add(new SqlParameter("@buissnessContactEmail", ""));
cmd.Parameters.Add(new SqlParameter("@buisnessContactEmailBad",false));
cmd.Parameters.Add(new SqlParameter("@groupEmail", false));
cmd.Parameters.Add(new SqlParameter("@isbAnaylist", ""));
cmd.Parameters.Add(new SqlParameter("@requestorCode", ""));
cmd.Parameters.Add(new SqlParameter("@toCustomer", false));
cmd.Parameters.Add(new SqlParameter("@toCustomerDate", ""));
cmd.Parameters.Add(new SqlParameter("@fromCustomer", false));
cmd.Parameters.Add(new SqlParameter("@fromCustomerDate", ""));
cmd.Parameters.Add(new SqlParameter("@toPST", false));
cmd.Parameters.Add(new SqlParameter("@toPSTDate", ""));
cmd.Parameters.Add(new SqlParameter("@iacUpdated", false));
cmd.Parameters.Add(new SqlParameter("@sft", false));
cmd.Parameters.Add(new SqlParameter("@vpn", false));
cmd.Parameters.Add(new SqlParameter("@epnVendor", ""));
cmd.Parameters.Add(new SqlParameter("@epnPackage", false));
cmd.Parameters.Add(new SqlParameter("@dlInquiry", false));
cmd.Parameters.Add(new SqlParameter("@abstractUpdate",false));
cmd.Parameters.Add(new SqlParameter("@juryExtract", false));
cmd.Parameters.Add(new SqlParameter("@bulkExtract", false));
conn.Open();
cmd.Connection = conn;
int rows = cmd.ExecuteNonQuery();
MessageBox.Show("" + rows);
cmd.Connection.Close();
}
|
|
|
|
|
do you by any chance have two databases, one you are looking at, and then being copied when launching your app (and being updated as expected)? Seems like having Visual Studio add a database to a project creates such a trap...
|
|
|
|
|
I double checked and the connection is to the SQL express database, so that does not appear to be the problem, my guess is I don't know how to insert a nullable field for the date fields and or the boolean fields.
|
|
|
|
|
IMO that does not match with your earlier statement.
However, if null is your problem, probably this[^] holds the solution.
|
|
|
|
|
Luc, I don't know if it is my problem or not.
|
|
|
|
|
Then stop making arbitrary statements, perform one or a few simple experiments (a table with one or two fields), and gather some facts.
|
|
|
|
|
Hi, I have a dll written by C++ with a function:
extern "C" long __declspec(dllexport) __stdcall Record(BSTR *buf, int *h);
Now, I want to call this function from C#. The problem is that I don't know how to pass unmanaged type (BSTR*). I try to marshal with UnmanagedType.BStr, but it's BSTR, not pointer to BSTR.
|
|
|
|
|
if you mean your native function is taking an input string pointer and may also replace it by a pointer to another string, I think you're in trouble as far as P/Invoke goes: who is going to delete the managed string that you no longer use, and how is the new native string going to get adopted by the managed world??
I would go for a simpler API, assuming the API can be changed that is.
|
|
|
|
|
Since BSTR is a pointer itself, I guess that passing BSTR* means that you have to pass an array of BSTR's. I am not sure if this would work, but these are my ideas:
You might allocate each BSTR of the array with the function SysAllocString. Yes, it returns a BSTR, but like BSTR is a pointer, you can import this function setting IntPtr as its return value, so you would build an array of IntPtr.
When you import the Record function, the first parameter should be of type IntPtr. So, when you invoke the Record function you should pass the address of the IntPtr[] array. You can get it with Marshal.UnsafeAddrOfPinnedArrayElement method. The second parameter is easy, I guess it is the length of the array of BSTR strings.
|
|
|
|
|
Hello,
i have a problem with sending a lot of udp data over the network.
Maybe somebody here, has to do with udp and can tell me, how to calculate the correct Udp-Datagram sending interval? My Datagrams contains a Class "DataFragment" which contains a continuous number (Package 1,2,3...n). If package 4 is here i check, if package 3 is here. If not i'll send a request to the other client back and it will send me the DataFragment again.
This sounds fine, but it doesn't work very well. I need to ajust the send interval of my "output-stack".
Has anybody a solution for this problem? (And please... no answers like "use TCP instead of UDP" and so on.)
Thank you
|
|
|
|
|
softwarejaeger wrote: And please... no answers like "use TCP instead of UDP"
Why not?
What you are doing is to try and run a TCP-like communication link using UDP. Unless your datagrams are totally independent then you need to implement some mechanism for re-assembling all the parts into the whole. This means you need to check each datagram as it is received, and if you have not received one or more in the sequence, you should check which are missing and request a retransmit from the sender. The actual sending interval is irrelevant as UDP merely transmits each datagram but does not check (or care) whether it is safely received or not, thus even if you figure out the optimum sending interval it still does not guarantee that i) the message will be safely delivered, or ii) the message will be delivered in the correct sequence.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Because i need to use UDP (that's it!)
So... what i've done? I exactly realized that, what you told me. I check the correctness of the package, i check if the previous package is failing (and ask the other client for that package) and to "ii)" because that's why i have a sequential number in each data package.
That isn't right, that the sending interval is irrelevant, because if i send data over the internet (behind two NAT) slowly, i get all data, but if i do this very fast, i have a high loss-rate, which i want to avoid. So i need to calculate the "correct" and stable data-sending rate.
|
|
|
|
|
softwarejaeger wrote: So i need to calculate the "correct" and stable data-sending rate.
Not an easy thing to do, since it depends on other factors, such as traffic density on the network, network reliability etc. I think you may find that these are the sort of things that need to be recalculated on a regular basis for optimum performance. Which is why most people will just say "use TCP, that's what it is designed for". However if you are able to create a better performing protocol using UDP you may be on your way to fame and fortune.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
softwarejaeger wrote: Because i need to use UDP (that's it!)
So reimplement TCP using UDP.
There is a reason for the functionality that exists in TCP. You can implement most of it via UDP.
Read the TCP spec and read up on the algorithms in it.
And one advantage there is that since the algorithms are self correcting there is no fixed interval.
|
|
|
|
|
Wow! You're expecting a lot for a protocol that doesn't guarantee delivery of packets at all, and get this, doesn't even guarantee that the packets will arrive in the order that you sent them! YES, it's entirely possible for packets to arrive in the wrong order!
Believe it or not, what you're trying to do is rewrite TCP yourself.
|
|
|
|
|
Errrrr, you don't want to use TCP, so you want to implement a network protocol which works just like TCP does... Well, I don't get the point. I don't know if you understand the difference between UDP and TCP, so let me give you some advices:
1. UDP does not provide any control over the order in which the datagrams will arrive to their destination. You should check for this in an upper level.
2. UDP does not provide any control if a datagram is duplicated. You should check for this in an upper level.
3. UDP does not provide any control if a datagram is missing. You should check for this in an upper level.
4. UDP does not provide any control if a datagram is corrupted. You should check for this in an upper level.
If you want to use UDP for a transmission that should work as if you were using TCP, chances are:
a) Use TCP (sorry, I know you don't want, but this is just what I would do)
b) Implement a new protocol which allow yo to:
1. Have control over the order in which the datagrams will arrive to their destination.
2. Know if a datagram is duplicated.
3. Know if a datagram is missing.
4. Know if a datagram is corrupted.
In other words, implement a variation of TCP protocol...
As I have seen in your post, it seems that you have only thought about the order of the datagrams and the missing datagrams, so you've got half of the job so far: you still have to check for duplicate and corrupted datagrams.
Edit: Sorry, I did not see the previous answer before writing this "Bible". Can we know why do you have to use UDP and cannot use any other protocol?
|
|
|
|
|