Yes, its a general table that gets normalized later. I have a DataTable containing the data that needs to go into this table. i was trying to do SQLBulkCopy, but that wouldnt work before the fields in the SQL table are of different data types and what goes in are Strings. So... I was trying to do insert SQL statements from the code.
When I have to do something like that I use bcp, the SQL Server command-line utility for bulk copy, to load the raw data into a (temporary) table and I have a trigger on the table that handles converting and moving the data to the actual destination(s).
Be sure to specify -h"FIRE_TRIGGERS" when running bcp.
The data is already in a DataTable in strings. I need to transfer that data into fields into an existing SQL table. The fields are all set to different data types so I have to cast the strings to whatever the fields are.
hi guys, I need help to read a block of data from a text file.
I m using StreamReader object and its method ReadBlock, which is supposed to write certain number of characters into a char buffer, but when I debug the code actually the buffer is not being written, all the values are empty.
We have a requirement in our MDI application wherein we have to load the child form with all the master data (from DB) only once. Basically after the form is loaded the first time, the subsequent instances need to load very quickly and not query the DB again.
I am not sure how we can achieve this in MDI. Can you give your valuable suggestion?
Please let me know incase you have additional queries.
Does anyone have a good tutorial or reference as to how to implement a website search function? I used to doing this in coldfusion with verity search and just wanted to know how to go about doing so in .net C#. Thanks in advance to all that reply.
I have some performance problems when I am using a third party dll to read and write to a GSM phone. I first used these commands to read and write in my main thread and noticed that when executing these commands, the application froze for a couple of seconds. The commands worked but the behavior was annoying. I then thought that running these commands in threadd separated from the main thread would solve the problem but it didn't. The application still freezes when using the read and write commands. Does anyone have any idea why? I though threads would solve these kinds of problems.
First of all I assume it is working ?
And I hope the DLL is not doing some GUI stuff of its own.
I guess you only have the DLL, that is not the source, nor a technical description.
You could have a look at the CPU load it creates: open Task Manager, Performance tab
and watch the curve while trying to read/write the GSM. If its close to 100% then
they probably have a busy loop, which is harming your main thread's behavior.
If so, you may try to set a lower priority for that thread;
that should solve the GUI part, but may cause the GSM DLL to malfunction...
If CPU load isnt high, they somehow execute (part of) their stuff on the main thread anyhow,
and your thread is pointless.
that could mean it is fully loading one of two CPU cores. Do you have either hyperthreading
or a Core Duo CPU ? if so, they have a busy loop, but then the other (half of) CPU might
(or might not) keep your GUI alive. Or they have an internal thread that they (temporarily)
switch to a higher (maybe real-time) priority to make sure they dont miss something.
If so, there is nothing you can do about it (you might notice it with some third-party
tool such as TaskInfo), that might confirm but not solve it.
Does it matter that the object I create, which is defined in the dll and is the object I use to read and write with, is not created in the tread but in the main thread?
I dont expect it to matter. Does their documentation say anything about that ?
I guess you will have to contact your DLL vendor...
In a new atempt to solve this, I tested to create and initialize the write object in the write thread so that it doesn't exist anywhere else but in the thread and this actually seems to have solved the problem. My application no longer freezes when writing data to the GSM phone. I have not tried changing the read process yet but it should probably give the same result.
Last Visit: 31-Dec-99 19:00 Last Update: 28-Jan-23 20:29