Does anyone has a working example of XMLSQLBulkLoad from C#? I have a dataset in C# which I am converting into XML and XSD as below m_dsExcel.WriteXml(path+ "\\RuchiT.xml"); m_dsExcel.WriteXmlSchema(path+ "\\RuchiS.xml");
Then I am making connection to SQL server as below, but nothing seems to be inserted in SQL table SQLXMLBulkLoad3Class bulkLoad = new SQLXMLBulkLoad3Class(); bulkLoad.ConnectionString = "PROVIDER=sqloledb;SERVER=servername;database=dbName;INTEGRATED SECURITY=sspi;"; ; bulkLoad.Transaction = false; bulkLoad.BulkLoad = true; bulkLoad.SchemaGen = true; bulkLoad.KeepIdentity = true; bulkLoad.Execute(RuchiS.xml, RuchiT.xml);
Any clues???? Appreciate you help. Thanks Ruchi
Ruchi Gupta
Posts
-
SQL XML Bulk load -
RAZR V3Hi Guys, I just bought a RAZR V3 with bluetooth capabilties. I was wondering if any one of you tech savvy guys knows easiest way to Sync laptop address book and cell phone phonebook. My laptop is not bluetooth enabled. Thank U Ruchi
-
Split app.msi into multiple msi and install-on-demandI have a C# windows application, for which I am building setup project. Since the project generates crystal reports (Designed using Version 10) I need to include merger module - CrystalReports10_NET_EmbeddedReporting.msm. I install the application on client machine and everything works fine. BUT since this Merger mudule is so huge that in increases the app.msi file size (some where newar 50 MB). I was wondering if there is a way to split the app.msi and add a launch condition that checks the GAC if required crystal DLL are there. If not it should install the other msi that writes dll's onto GAC Any direct or round about way to accomplish above. Basically the problem is setup is placed at a network location and due to huge size of msi it takes annoying amount of time to load installer and then to do the installation steps. Thanks in advance Ruchi
-
Disabling a TabPage in TabControlone way to achive this is keep a global class variable
int lasttabIndex;
At form load time set it to whatever tab you want to open the first time form loads. There after in eventprivate void tabControlDeal_SelectedIndexChanged(object sender, System.EventArgs e) { TabControl ctrl = (TabControl)sender; int x = ctrl.SelectedIndex; //Do decisions on the basis of the value of "lasttabIndex " //at the end do this lasttabIndex = x; }
Hope this helps Ruchi -
"NO Such interface supported" C# to ExcelHi All, I am getting this error "NO Such interface supported" when from my C# application I am trying to export rows to Excel. This is a problem only on certain user machines and they are running same vesion of Excel (i.e. 2000) In refernce to Microsoft article http://support.microsoft.com/default.aspx?scid=kb;EN-US;316653[^] I did ILDASM on Interop.Excel.dll in my program files and found that classes with suffix _SinkHelper are all Public. But on that users machine it is private. I am wondering why such inconsistency with the same setup project. Any help and pointers are appreciated. Thanks Ruchi
-
like operator in C# DatatablePaul, I know how to use Select with DataTable. I couldn't find any example for LIKE operator from the link that you specified. Could you please point out specific example out of that link. Thanks Ruchi
-
like operator in C# DatatableHi all, I have a datatable, which I want to query by using LIKE operator like we do in SQL SQL Select * from Tab1 where col1 LIKE '%xyz%' C# datatable dt dt.select(...) Is it possible in C#. Please advice Thanks Ruchi
-
Filewatcher, additional need to monitor User making changesI have a need to monitor a server. I found out that this can be done using FileWatcher. But filewatcher just tells what change & kind of change (delete, rename etc) that has taken place. I also want to know who (User) made the chane and the machine name or address from where changes has taken place. Any pointers in this regard :-) Thanks Ruchi
-
DirectoryServices - NT authenticationI have need to authenticate users using windows authentiateion. I am using following code to do that. But problem with this is after three unsuccessful attempts, it locks user out from other applications using Directory Service, the same way when we try to login to windows machine and three consecutive wrong passwords locks the users out. Does anybody know how can I use Directory Service to make non-blocking call upon wrong password
DirectoryEntry entry = new DirectoryEntry("LDAP://RootDSE"); String str = entry.Properties["defaultNamingContext"][0].ToString(); MessageBox.Show(str); DirectoryEntry domain = new DirectoryEntry("LDAP://" + str, txtLogin.Text, txtPassword.Text); try { Object native = domain.NativeObject; MessageBox.Show(txtLogin.Text + " Authenticated. Hurray!!!"); } catch(Exception ) { MessageBox.Show(txtLogin.Text + " INVALID user :-(("); }
Thanks you very much, Ruchi -
Copy from Excel and paste on DataGridHi All, Has anybody implemented copying from excel and pasting on to Datagrid. Thanks Ruchi
-
Row ConcatenationThanks very much for your response. I myself am doing the same thing you suggested - Cursor & Updates. But it is kind of expensive operation, when temp table is huge (depending on param passed to SP) I need this result set for C# application. Could you please give me pointers on how you do it in ADO.NET Thanks Ruchi
-
Row ConcatenationI have followign two tables, and want to update TB1 such that IDs col gets updated PARAMETER tables TB1 Dt desk IDs ----------- ---------- ---------- 1 PT 1 AB 2 PT 2 AB TB2 Dt desk book IDs ----------- ---------- ---------- ----------- 1 PT PT1 100 1 PT PT2 200 1 PT PT3 300 1 AB AB1 400 2 PT PT1 500 2 PT PT2 600 2 PT PT3 700 2 AB AB1 800 Final RESULT TB1 Dt desk IDs ----------- ---------- ---------- 1 PT 100, 200, 300 1 AB 400 2 PT 500, 600, 700 2 AB 800 Any pointers Thanks Ruchi
-
Dates table YTDHi All, Currently in my stored procedure I need to build a table with all dates starting 1st Jan to the date passed (YTD). Cuurently the way I do is, I start from first date of year and loop till @Datepassed, ignoring Sat and Sun.
SELECT @tdate = @YEAR_start WHILE @tdate <= @Datepassed BEGIN if DATEPART (dw, @tdate) not in (1,7) INSERT INTO #DATES (tdate) VALUES (@tdate) SELECT @tdate = dateadd (dd,1,@tdate) END
Foreg:- if dec 12 2003 is passed, looping becomes inefficient. Does any body know a better way. Thanks Ruchi -
ComboBoxColumn in Datagridtry tableStyle.MappingName = dataView.Table.TableName;
-
ComboBoxColumn in DatagridRefer to following article....it might help http://www.codeproject.com/cs/miscctrl/datagridcomboboxcolumn.asp Thanks Ruchi
-
Garbage collectorApplication Type: C# Windows Application This application generates multiple reports in batch. For each report requested in the batch, main process spawn threads. Each thread connects to database gets DataSet and Invoke a method to attach ReportDocument with the CrystalReportViewer. Now after threads complete execution, result is multiple reports. Even after I close all reports, I don't see the Mem Usage coming down. This looks like to be an issue with memory taken during the execution of threads. Can somebody suggest what should be done for fast memory recovery :confused: Thanks Ruchi
-
Setup & deployment Project - Desktop shortcut - unable to edit target propertyHi All, For my .NET C# windows application, I am building the installation setup using "Setup & Deployment" project. At the end of installtion it places a shortcut on users's desktop ( the way I want) But the problem is if I want to specify some command line parameters I right click the shortcut--> go to properties, but what I see is "Target" as non-editable field. So to specify some command line params I need to go to "Program Files"/"Appl Folder" and create a new shortcut to the excutable to specify command line params. Any clues as to how I can set property such that at the end of installation the shortcut that installation places on desktop has editable "Target". Thanks Ruchi
-
Setup & Deployment project - "All User" installationThanks Sreejith for the reply. Actually I could create the setup project, but problem I have is in specifying property such that at the time of installation it asks me, if the installation is to be done for "All Users" or "Logged in user" Thanks Ruchi
-
Setup & Deployment project - "All User" installationThanks Heath for the reply. The solution you suggested works by specifying command line params like this
msiexec /I mysetup.msi ALLUSERS=2
But I couldn't find a way such that I set this property at the time I create MSI file from the .NET "Setup & Deployment" project. I am sorry I am a little novice there. Please suggest. Thanks Ruchi -
Setup & Deployment project - "All User" installationHi All, For my .NET Windows application (C#), I build the installation setup from .NET framework (Setup & Deployment Project). I am unable to find the property, which I can set to give user the choice for installation i.e. whether installation will take place for the logged in user or for everyone [Everyone /"Just me" thingy]:doh: Any help is appreciated Thanks Ruchi:confused: