|
hello
I'm trying to upload to database object of type byte[], currently using C#/byte[]/DbType.Binary (implementation in progress) and database column "varbinary(MAX)" with SQL Server. But I then realize this is SQL Server specific and would really prefer something that's database independent.
Also haven't tried the part with IDataParameter.DbType = DbType.Binary yet, not sure if this is right because I was reading an article - varbinary goes with SqlDbType.VarBinary, not sure if DbType.Binary is correct at all.
Thanks
dev
|
|
|
|
|
System.Data.DbType and corresponding provider specific DbTypes are linked so using the System.Data.DbType should match correcly to the corresponding DbType.
However, if you're making this database independently, have you considered using OleDbConnection against all databases.
|
|
|
|
|
I want to use C# to save the changes made to an existing excel file. The path of the excel file is fixed and it can be assumed that the file is opened in an excel window from before. All I want to do is write a program that periodically saves whatever changes were made to the file (in the excel window) since it was last saved. I have tried sending the Ctrl-S windows message to excel and also tried playing around the Microsoft.Office.Interop.Excel namespace, but to no avail. Is there a way to do this that anyone is aware of? I am using Office 2007 but a solution for Office 2003 or 2002 will also be of help to me.
--
Nikhil
|
|
|
|
|
When the Excel is opened then you have to attach your application to existing Excel process. The Save method works for me.
|
|
|
|
|
Can you write some sample code to attach an object of Microsoft.Office.Interop.Excel.Application to an already existing excel.exe application?
|
|
|
|
|
Hi everyone,
I am working in button click event and i want to get row index of selected row.
Kindly let me kknow.
Thank you in advance
(Riaz)
|
|
|
|
|
|
YourDataGrid.SelectedRows[0].Index
First check if YourDataGrid.SelectedRows.Count > 0
|
|
|
|
|
This is how to get selected row from DataGridView in .NET 2.0
Make sure there’s a single cell that is currently selected
Get current row index using {datagridview instance}.CurrentCell.RowIdex
Get the selected row using {datagridview instance}.Rows({current row index}).Cells({zero based index}).Value
Here’s the sample code :
Dim crow = DataGridView1.CurrentCell.RowIndex
dim txt as string
Try
txt = DataGridView1.Rows(crow).Cells(0).Value & ” || ”
txt = txt & DataGridView1.Rows(crow).Cells(1).Value & ” || ”
txt = txt & DataGridView1.Rows(crow).Cells(2).Value
MessageBox.show (txt)
Catch ex As Exception
‘ do nothing
End Try
WaelA
Senior Software Engineer
http://www.linkedin.com/in/waelalwirr
abu_wer@hotmail.com
|
|
|
|
|
Hi,
I want to change some looking of some control.
For example - i want to change some Button to be circle.
How can i do it ?
Thanks.
|
|
|
|
|
You can handle the paint event and do your own drawing. This[^] was my first hit when I searched.
|
|
|
|
|
Alternatively, you can do something like I did in this[^] reply if you don't want to handle the drawing of the entire control, this was for a pictureBox but works for other controls too.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Dear All,
I have a network program which has client and server.
The server will be listening the client at a specific port and IP address.
The client is connecting and writing the data to the server.
When the client connection is established the server will continuously listen the client and gets the packet sent by it.
When the time goes on the server takes up lots of memory in RAM and the CPU utilization goes to 80 to 100%.
The connection used was TCP.
Can any one tell me why this happens.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: CPU utilization goes to 80 to 100%
Probably because of incorrect usage of threads. Try to use asynchronous fashion methods (BeginXXX,EndXX) which is very efficient. Hard to tell more without seeing the code.
|
|
|
|
|
M. J. Jaya Chitra wrote: CPU utilization goes to 80 to 100%
looks like you are using while loop, instead of thread.
|
|
|
|
|
I am working on an assignment tt reads in *.cs files fr a given directory and do some evaluation with it. At first i thought it was just a small assignment, so Visual Studio is not required, then when i read my assignment requirement again, I find out tt I might require the use of Visual Studio (as our lec wants us to learn it for our upcoming big assignment).
And my code works under command prompt (can read all the *.cs files) but gives me a FileNotFound Exception when working under Visual Studio environment. Does anyone has any idea on how to solve this problem?
--------------------
C:\Documents and Settings\myname\My Documents\Visual Studio 2005\Projects\Stat
Generator\StatGenerator>StatGenerator.exe
Enter the directory name with the C# files to be evaluated:
C:\Documents and Settings\myname\My Documents\cs
Total of 3 C# files found.
File Name: StatGenerator.cs
author's_unix_id: myname
LOC without comments: 71
LOC with comments: 71
Comments lines: 0
File Not Found: Could not find file 'C:\Documents and Settings\myname\My Docum
ents\Visual Studio 2005\Projects\StatGenerator\StatGenerator\test.cs'.
Enter the directory name with the C# files to be evaluated:
|
|
|
|
|
Not sure I understand you - but when you build the project in VS it places the executable in a specific location (bin\debug by default) so that would be the folder from which any relative paths are generated - i.e. if your program tries to open a file called 'test.cs' without specifying a complete path, then it will just look in the same folder that the exe is in.
So - you could move your files to this folder, copy the exe from this folder to the folder containing the files, or specify the path to the folder containing the files in the program and be explicit when you open them.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
|
You see, this is what we don't want here. That screaming Subject annoys us
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
OK - as per your title.
There's the door. Don't let it hit you on the way out.
|
|
|
|
|
Hi,
I am busy with an NTier Windows Application that has the following:
Presentation Tier (Windows Application)
In the presentation Tier I have a form with a Combobox.
DataAccess Tier (Class library)
This tier contains the DataSet TableAdapters.
DataEntityTier (Class library)
This tier contains the DataSet Validation and Structure.
DataService (WCF)
This tier connects to the DataAccess tier in order to retrieve the data.
I have successfully implemented the GetData() method via the WCF service. How can I implement the Fill() method? I currently have a combobox that I have set the datasource, datamember and valuemember but nothing gets populated. How can I get the data from the dataset to the combobox using WCF??
IService1 File:
[OperationContract]
WBGTS.DataEntities.dsEntities.IndustryDataTable GetIndustries()
Service1 File:
public WBGTS.DataEntities.dsEntities.IndustryDataTable GetIndustries()
{
WBGTS.DataAccess.dsIndustryTableAdapter taIndustry = new WBGTS.DataAccess.dsIndustryTableAdapter();
return taIndustry.GetIndustries();
}
Windows Form:
Form_Load(object sender, eventargs e)
{
ServiceReference1.ServiceClient proxy = new ServiceReference1.ServiceClient();
dsEntities.Industries.Merge(proxy.GetIndustries());
}
Illegal Operation
|
|
|
|
|
can you tell me little bit more in which layer your method fill ...
have your values in datareader ,create some business object that can hold these values.
return it to the presentation layer ... and read the values again
using the interface method ".GetDataTable(your method )"
i think via this way u can populate the value...
vikas da
|
|
|
|
|
Hi All,
does anyone come across this problem "the selected file is a visual studio solution file, but was created by a newer version of visual studio and can not be opened." i was trying to open a asp.net application created by visual studio 2003.net about 2 years ago, and now i cant open it in visual studio 2003.net? what the hell?
I have both visual studio 2005 and visual studio 2003.net installed on my machine. is this could be the .net 2.0 framework issue?
plz help
|
|
|
|
|
AndieDu wrote: is this could be the .net 2.0 framework issue?
Visual Studio solution files have nothing to do with the .NET framework.
AndieDu wrote: I have both visual studio 2005 and visual studio 2003.net installed on my machine
Could you have inadvertently opened the solution in Visual Studio 2005 and upgraded the project?
If you look at the solution file in Windows Explorer does it have a version number in the icon? If it is a Visual Studio 2005 file it will have an 8 in the bottom corner, otherwise a 7.1
|
|
|
|
|
excellent mate, thanks a lot, i can see teh solution icon has 8 on it.
now the issue is that i neither can open in 2005 nor in 2003.net and i do need to open it in 2003.net due to compability issue. can you guide me through?
many thanks
|
|
|
|