Question about Computers & Internet
How to insert the data in the database from a .net application. i'm using c# as code behind language n getting problems while inserting text fields,number fields are getting inserted without any problem.
Please help me.
Thanks in advance.
You probably need to be inserting the value of a text object (ie, a String) , not the object itself. In VB.NET, a String object is an actual, not unlike a Java String object. In "classic" VB, a String object isn't really handled by the interpreter as an object in the C# / Java sense, so it can be referred to directly without resolving the value via a method call. So attempting to insert an object reference into a database field from C# code will probably not work unless the database knows to call toSting() on the object, which I am 99.99999% sure it cannot (depends on the database-- in this case Access, and more particularly, what version you are using, and if there is any .NET framework interoperability).
Calling myString.toString() though returns a String object in C#, so using that is likely not going to work. What you may need to do is return a character array using the 'chars' and 'length' properties of the C# String object.
Finally, after all this, your problem could be a lot simpler: the value(s) you are trying to insert may not be right for the field-- check the length of the values being inserted, etc. Use .trim() to eliminate leading and trailing whitespace, for example. If you post your INSERT statement and an example of the data you are using, I may be able to tell you more. Also, you are in ASP.NET and data transfer from web containers to Access databases is notoriously bedeviled work.
Posted on Mar 07, 2008
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
Here's a link to this great service
Posted on Jan 02, 2017
Tips for a great answer:
are some reasons which may damage your MS access database such as
virus infection, software crash, accidental shutdown of system,
unrecognized format of database, corruption of storage media etc.
These issues are easy to overcome by using third party software of
access database repair.you can try Kernel Access Database Recovery Software one of the best software in Data Recovery
For information you can visit here ...http://www.accessrecoverytool.net
Aug 23, 2010 | Microsoft Computers & Internet
Jun 02, 2010 | Microsoft ASP.NET Programming with MS...
May 31, 2010 | Microsoft ASP.NET Programming with MS...
Mar 09, 2010 | Microsoft Office Standard for PC
Oct 15, 2009 | Microsoft Designing ASP.NET Applications...
Sep 21, 2009 | Microsoft Office Standard for PC
Mar 09, 2009 | Microsoft Press MS Access 2000 and Visual...
Dec 21, 2008 | Microsoft ASP NET WEB MATRIX (583797)
Oct 18, 2008 | Microsoft Office 2003 Basic Edition...
Aug 16, 2018 | The Computers & Internet
207 people viewed this question
Usually answered in minutes!