|
DaveyM69 wrote: Cheers Pete, I actually found and posted the solution at the same time as you!
I used System.Reflection.MethodBase.GetCurrentMethod() instead of StackFrame.GetMethd()
Are there any advantages of either one?
Well, the StackFrame always implicitly returns MethodBase information, plus it returns line and file information if it's a debug build (obviously no line/file info should be returned for a release build). So, no real benefit of either one.
|
|
|
|
|
Hi,
I need to display the contents of a spreadsheet document in a listView or dataGrid. The code that I have opens the document, but only prints the first column's data. I need it to print all the data. I also need to add a new column in the spreadsheet as it loads. Please help!
Regards,
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
|
Hi,
thanks for the reply, but I saw this article and the listView does not display the contents of my spreadsheet properly. It only displays the first column.
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
Good Afternoon All
An new in C#, i have been doing Ado.net in vb.net. i want to use a Stored Procedure to do my database work, and i want to tell my command object that we are going to use a StoredProcedure. if i try this
<br />
<br />
cmdselect.CommandType = CommandType = StoredProcedure;<br />
<br />
I get an Exception that says
The Name StoredProcedure does not Exists in the current context
i have googled and my line looked ok, but i dont know what is wrong with this line
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
hi Thanks for your Reply
like this
<br />
cmdselect.CommandText = "get_me";<br />
<br />
cmdselect.CommandType = CommandType = StoredProcedure;<br />
"get_me" is the name of the Procedure.
and this is how i wrote my code, what is Wrong ?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa wrote: and this is how i wrote my code, what is Wrong ?
Since this code would generate a compiler error, surely the error message would be able to pinpoint where the error is.
Try:
cmdselect.CommandType = CommandType.StoredProcedure;
Note the dot instead of the second equals sign.
|
|
|
|
|
Thanks it worked
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi!
The first place to look for parameters should be the documentation - MSDN still is the authority to ask.
Try explaining what your cmdselect.CommandType ... line does (not what you want it to do, but what the meaning of the statements you've written is!).
You'll see that the two assignments you're performing are nonsense.
StoredProcedure is an enum value and you have to tell which enum it's a part of.
Btw., you don't get an Exception but a syntax error during compilation - that's a huge difference!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks man i saw the Problem
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
//Try the ff:
cmdselect.CommandType = System.Data.CommandType.StoredProcedure;
cmdselect.CommandText = "Name_Of_StoredProcedure";
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
Thanks man it Worked
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Glad to know
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
Thanks Bro
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
this is my suggestion check it out. the line should be
cmd.CommandType = CommandType.StoredProcedure;
|
|
|
|
|
Thanks i get your point
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
i'm using C#2005
i need to doing my two sqldatadpaters or more then in one transaction , and when happend error rollback all operation .
123
|
|
|
|
|
use
Try...Catch..Finally
google it for more info
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
After doing a the following
gacutil -i Microsoft.Office.Interop.Word.dll and
regedit /s Microsoft.Office.Interop.Word.dll.reg
I get the following error:
Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
C# Code:
Word.Application oWord;
oWord = new Word.Application();
oWord.Visible = true; // This line is generating error
Regards,
Pavas
|
|
|
|
|
Hello there!
Can anyone tell me how to Rename an active directory object using DirectoryServices.AccountManagement
Thanks in advance!
|
|
|
|
|
i need to control read from usb host?
123
|
|
|
|
|
i guys was wondering if someobdy could help me out please
i am using the video player that direct x provides and playing it through a panal.
i can get the panal to play when i select the name of the file from the openfile dialog
if (openFileDialog1.ShowDialog() == DialogResult.OK)
movie = new Video(openFileDialog1.FileName);
but instead of me putting openFileDialog1.FileName in above i would like to specify the file name like c:/"""/""".mpeg for instance but it will not play. i get the following error
Error in the application.-2147220970 (VFW_E_NOT_FOUND)
at Microsoft.DirectX.AudioVideoPlayback.Video.Open(String fileName, Boolean autoRun)
at Microsoft.DirectX.AudioVideoPlayback.Video..ctor(String fileName, Boolean autoRun)
any ideas?]
j2s
|
|
|
|
|
I don't use DirectX, but in c#, the backslash character is an escape character, so in path strings it can mess up the string. Try either using double backslashes to get what you want. e.g
String fileName = "C:\\myfolder\\myfile.mpg";
or you can use the @ character to make c# ignore all escape characters in the string.
String filename = @"C:\myfolder\myfile.mpg";
Simon
|
|
|
|
|
forgot to say that i am using double black slashes friend
i will try the @ symbol to see what happens
thanks
|
|
|
|