Skip to content
Advertisement

Tag: c#

How do I safely read from a stream in asp.net?

If: Reading from a stream in a single call to Read is very dangerous. You’re assuming all the data will be made available immediately, which isn’t always the case. You should always loop round, reading until there’s no more data. How should I change the above code to make it ‘less dangerous’? Answer Jon Skeet actually has a really good

SQL/C# – Best method for executing a query

I need to execute a sql query from within a c# class. I have thought of 2 options Starting a process of sqlcmd. Using a SqlCommand object. My question is which would be the better way? It’s important that the solution only holds a connection to the server for a short time. I’m open to other ideas if the above

Make DataBase portable

I’m developing a local application with a DataBase in SQL Server 2008 and Visual Studio, C#, I created and connected to the Database in the application, but when I pass to work to another computer, copy the all solution files, the information that had been saved in it doesn’t exist, actually the entire Database doesn’t exist, so I ask: have

Is a Union Query needed

I need a little help writing a query. I have this data… I need to query the data and have an output something like this The idea here is to select the direction, the LowNum and then the nextNumber. Also when the direction changes to start over. (That’s why I think I need a Union, maybe get the North, then

SQL Server Native Client API examples

I am writing a C++ application that needs to execute SQL queries in a SQL Server DB and I want to do it using SQL Server Native Client. The MSDN documentation has no a full reference on it and has a few examples so I am looking for some site having more information on how to connect, execute queries and

Advertisement