|
Hi,
I need to load data from .csv to SQL Server(2005).I may have to do it often thus need a simple,cost-effective way of doing it.
I tried using Bulk Insert but there are issues with delimiter(they are not same all files)
Any pointers would help!!!
(May be c# .net too)
Aswini Kumar.A.V.
Hyderabad, India
|
|
|
|
|
Do you mean a scripted method? If not its pretty straightforward using the import menu in Sql Management Studio.
Regards,
Rob Philpott.
|
|
|
|
|
I want to get extension of file that the user has selected to open.
OR i want to allow the user to open only specified types of file in the
"FileType" field............
Regards,
chanzeb chaudhary.
|
|
|
|
|
Have a look at the Path class. It has methods that allow to manipulate with the string that represents a file path. You can retrieve the name of the file chosen through the openfiledialog by its filename property.
If you want to allow the user to open only specified types of file using openfiledialog then use the Filter property of openfiledialog class.
|
|
|
|
|
Hi,
here.. i am checking the extension of file name extension to jpg..
for image files
if(Path.GetExtension(photoFile.FileName).ToLower()!=".jpg")
{
MsgLabel.Text=" File should have .jpg extension ";
return;
}
Aswini
|
|
|
|
|
As I said you can use Filter property of openfiledialog class to restrict files with jpg extension
|
|
|
|
|
Use filter for the openfiledialog eg: C# files(.cs)|*.cs makes only .cs fileextensions to be selected.
Koushik
|
|
|
|
|
hi !i wanna msdn and visual studio.net 2005 setup!please give me a link to download it!
thanks
|
|
|
|
|
Check this[^] out. If you want a non-Express version, then you will have to buy it.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I’m working on developing a simple WPF application that will need to get its data source from a SQL2005 Database. The question I’d like to ask however is what would you consider to be the most appropriate Database connectivity for such an application?
(The application is geographically local to the server and serving several dozen simultaneous users (later in the development cycle). The application will be using touch screen technologies and the application its self will be deployed as a click-once application)
Here are a few of the technologies I’m considering, and what I see as their pros & cons:
1, The application contains it’s own CLR to connect to the DB:
Pro: Simple
Cons: Doesn’t scale well, each application will have it’s own separate connections
2, MS Smart Client application framework:
Pro: readily available, well documented, proven to work, scalable
Cons: Complicated, weighted down with stuff I neither want nor need
3, Remoting, using remote CLR objects:
Pros: simple and readily available
Cons: Not well accepted as best practice coding for this type of application
4, Application uses XML web services:
Pros: relatively simple, scales well, very well accepted & documented
Cons: Hmmm… can’t really think of any show stoppers
I’m tending to lean towards number 4, but I’m open to suggestions, the project is just starting up, we have no baggage to carry and I have an open slate… Coding nirvana!
So my question remains, Can you think of any more methods? And can you think of a reason I shouldn’t be using number 4?
Thank you all for your Guru-like help
Alan
Alan Boldock
Royal Adelaide Hospital
|
|
|
|
|
hi all
is there any possiblity to read the half of the fle name
that is i have a file name Myfilename_name.txt, i want to read its name only up to Myfilename. is it possible in C#. like if we want to search a file we used to give like name.* or *.txt or na* . like that
do plz help me to solve this.....
|
|
|
|
|
Do use "split" function and take the one before the last item in the returned array.
jayasshc
|
|
|
|
|
u just specify the number of characters.. in the search..
Aswini
|
|
|
|
|
u can use split and substring functions
Aswini
|
|
|
|
|
Hi
I have an asp.net application. whenever i compile or run my application it's create extra .temp files, then i have to delete that files again and again. Would you please tell me the reason why it is creating this file and how can i restrict this.
Pankaj
|
|
|
|
|
asp.net has to compile your code to run it (creating dll of your files)
and then it can run the app you can try to pre compile your app this might help
Please tell me if I am wrong
|
|
|
|
|
basically temp files are created in C:\Windows\Temp and it contains file inforamtion about all the web pages that the browser opens, well i am anot very sure whether you can really restrict this from happening. One way out is to go to Tools->Internet Options and go to Temporary Internet Files and delete all temp files from there or write a simple code in ur web app to delete those files on the exit of the application automatically.
|
|
|
|
|
actually when i compile the application it's create the temp files and add into the solution.
Pankaj
|
|
|
|
|
hi guys
i have a contextmenue with my datagrid,
but when i right click to open this contextmenu on data grid, grid,s click event is also fired
after contextmenu popup event,
i dont want that
how can i handle that?
hello
|
|
|
|
|
While executing my windows service, which will read the messages in the message queue (Public Queue) , I am gettign the following error:
at System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle()<br />
<br />
at System.Messaging.MessageEnumerator.get_Handle()<br />
<br />
at System.Messaging.MessageEnumerator.MoveNext(TimeSpan timeout)<br />
<br />
at System.Messaging.MessageEnumerator.MoveNext()<br />
<br />
at System.Messaging.MessageQueue.GetAllMessages()<br />
<br />
at Versatile.Services.EventExecuter.EventExecuterService.ExecuteEventsOnTimeTick(Object sender, ElapsedEventArgs e)<br />
<br />
For more information, see Help and Support Center at http:
Can any one tell me the cause of the error.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi,
I want to restrict a class to not to have more than 5 objects of that class.
kindly revert me a good solution.
vijay
|
|
|
|
|
Use a factory pattern that creates only upto 5 instances. When your object is disposed, decrement the static reference count.
/ravi
|
|
|
|
|
thanks ravi,
but my question is how to restict the user to create the next instance. The code for the the same. I am using C#.net
|
|
|
|
|
He answered your question. I imagine the fact that he didn't post the code you are not happy.
You want only 5 instances of class A .
Create a factory class AFactory .
The user of your code calls
AFactory.GetNewClassA() . In this class you have a reference coutner, which counts how many instances of Class A have been created. If this counter is less than 5, create and return a new isntance of Class A and incretment the counter. If it is already 5, don't create a new instance.
You can also do this as a static Create method on Class A, using a static reference counter. Google for Factory Pattern.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Hi all,
I'm new to C#, but have a complex situation here. I have a c++ code that need to be converted to c#. The c++ code stored a data in BYTE type..e.q of c++ code:
BYTE bGMPCName[81] = ""; char cGMPCName[81] = "";
long status = JPN_GMPCName(bGMPCName);
memcpy (cGMPCName, bGMPCName, 81);
AfxMessageBox((CString)cGMPCName);
From what i know c# doesn't support 'memcpy' function and i also have a troublesome to read the string in c#.
I've read something on 'MemoryStream' but still don't understand how it works.
Your help is really needed
Thanks
-zai-
|
|
|
|