Thanks for the response. Ya using ref in the method's declaration of C# we can get the correct syntax in VB but is there any other way which does not require any ref in the method declaration.
nicolus
Posts
-
How to marshal string array from C# to VB? -
How to marshal string array from C# to VB?Hi i am writing a C# class library which i want to use in my VB Client So i wrote class like this [Guid("0AA209CD-D713-4336-8804-F7D4888F58BD")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown )] [ComVisible(true)] public interface IClass1 { void Temp1([MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPStr )] String[] IDs,int size); } [Guid("CCDAD140-DD55-4047-A925-A1B539396A01")] [ComVisible(true)] [ProgId("CommonCatalogue.Class1")] public class Class1:IClass1 { public void Temp1([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr)] String[] IDs, int size) { string TempDate = "dfdf"; } } but when i referenced this library (.tlb) in VB the temp method singnature coming as Temp1(IDs As String, size As Long) i am unable to fix this. Please can any one help me in figuring out this.
-
how to check the database connected is readonly?I want to check whether the databse connected is read only or readwrite. IS there any way to check this. thanks in advance.
-
How to know which version of Oracle client is used by the .Net?Hi, Curretly i am doing some operations on tables of oracle 9i database using oracle connections and commands by using the namespace "System.Data.OracleClient" i want to know which provider is used internally by the .Net for the database operations with this namespace and by the by client version of oracle on my system is 10g. Thanks in Advance.
-
Is it possible to query any text on xmldata of sqlserver 2005 table?Actually i want to search the string "title" at any location through out the complete xml data. what is the way to frame the query? Plese help.
-
Is it possible to query any text on xmldata of sqlserver 2005 table?I am querying like below SELECT XMLData.query('"title"') FROM XMLTable on an sql server database's xmlTable's XMLData of xmltype field. But it alway returning the string "title" for all the records in the table. Is it not possible to query like the above ? Please suggest something.
-
Why the exception "Could not save; currently locked by another user" raise?Thanks for the reply, Exactly i am using access. Actually my code calls internally some services which are also using the same connection and upto my knowledge they are getting closed as soon as the service use is finished. Or otherwise is there any way to view all the connections which are open?
-
Why the exception "Could not save; currently locked by another user" raise?When i tried to update the contents of a table in my database using oledbcommand i am getting the "Could not save; currently locked by another user" exception. I tried closing the connection other places where ever it is used. But still the same problem is coming? what should i do? Please help me?
-
Why the exception "Could not save; currently locked by another user" is coming?When i tried to update the contents of a table in my database i am getting the "Could not save; currently locked by another user" exception. I tried closing the connection other places where ever it is used. But still the same problem is coming? what should i do? Please help me?
-
How to add an xml node such that validition of the file should not be failed?I need to add an xml-node to my xml file, which later i will validate. Is there any way to know the exact location where i need to add that node so that validation does not fail? :doh: Thanks in Advance.
-
In C# is there any way to know the number of non null elements in an array?As length property give complete number of elements in the array. But if only i want to know count of only not null values elements of the array what should be the method or property need to be used. Thanks in Advance. :doh:
-
How to read the node from xml file in C#?Ya thats a very good alternative thanks for it. But still is there any way to get it with the Xpath as the parameter? Because my xml file contain multiple occurrances of some nodes and with in those nodes some Hierarchy levels are there so to extract them, if i use XPath mechanism then the nodes will come properly.
-
How to read the node from xml file in C#?but i want to read the inner text of the any node specified(using xpath) in the xml file.
-
How to read the node from xml file in C#?i have an xml file in the following format i want to read a node's text in the following manner in C# but it is not giving any thing why? and how to do that? Pls help me. Here is my xml file ("withNsxml.xml")content: fgdfgdfgjkfjdg This is the code snippet i am using to read the text in "MD_Identification" node XmlDocument XDom = new XmlDocument(); XDom.Load(@"F:\withNsxml.xml"); XmlNamespaceManager XMLNSMgr = new XmlNamespaceManager(XDom.NameTable); XMLNSMgr.AddNamespace(string.Empty, "http://www.isotc211.org/2005/gmd"); XmlNodeList nodes1 = XDom.SelectNodes("md_metadata/md_identification", XMLNSMgr); foreach (XmlNode node in nodes1) { MessageBox.Show(node.InnerText ); } Thanks in advance.
-
is the order of parameters addition to a command for update command realy required?thanks now its working (yes order mattered).
-
is the order of parameters addition to a command for update command realy required?i am using an oledbcommand object to perform both insert and update based on the command text supplied and i am adding the parameters for update also in the order of insert. So incase of update though, its not giving any error/exception but database is not getting updated. Can any body pls tell me how to resolve this or any other way to implement both the functionalities using single method. Thanks in advance.
-
is the order of parameters addition to a command for update command realy required?i am using an oledbcommand object to perform both insert and update based on the command text supplied and i am adding the parameters for update also in the order of insert. So incase of update though, its not giving any error/exception but database is not getting updated. Can any body pls tell me how to resolve this or any other way to implement both the functionalities using single method. Thanks in advance.
-
Is there any way to diaplay description of a function as tooltip for a userdefined function C#Wow......... It really helped... Thanks grim.
-
Is there any way to diaplay description of a function as tooltip for a userdefined function C#I have a Class Library in which i have lot many functions to implement my service but the problem is maximum of functions are Having similar names and similar parameters etc. when i want to use any of these functions i am some what confused which one is the one which exactly i shoould use. So is there any way to "Provide the Description of the function" along with the Prototype of the function which comes as default due to intellisence of MicroSoft. I tried the [Description("xgdfgdfg")] attribute above the function defination but no use. Can any body know how to get the user defined description for a function Thanks in Advance.
-
why my enum return value is in integer in C#hi Gajatko, i don't know why any alternative is not working in my m/c. when i tried MessageBox.Show(Enum.GetName(typeof(enumCatalogExportStandard ), ImportStandard)); gave me a null string as output. i am sending the code snippets where ever i am using the enum related stuff in my code pls view. public enum enumCatalogImportStandard { CatccImportAsISO, CatccImportAsFGDC, CatccImportAsNative }; enumCatalogImportStandard ImportStandard; private void cmbTargetstd_SelectedIndexChanged(object sender, EventArgs e) { if (cmbTargetstd.SelectedItem.ToString() == "ISO") ImportStandard = enumCatalogImportStandard.CatccImportAsISO ; else if (cmbTargetstd.SelectedItem.ToString() == "FGDC") ImportStandard = enumCatalogImportStandard.CatccImportAsFGDC ; else if (cmbTargetstd.SelectedItem.ToString() == "Native") ImportStandard = enumCatalogImportStandard.CatccImportAsNative; } private void btnApply_Click(object sender, EventArgs e) { CImportCatalogRecordService.ImportCatalogRecordService objImpRecService = new CImportCatalogRecordService.ImportCatalogRecordService(); //below statement returning number instead of string objImpRecService.ImportStandard = ImportStandard; objImpRecService.InputFileName = txtImportFolder.Text + "\\" + Rec; objImpRecService.CatalogConnection = con; objImpRecService.Execute(out MetadataID); } this is all my code Pls view.