Question about Business & Productivity Software

1 Answer

MS Access and ASP.net application

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.

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Mentor:

    An expert who has written 3 tips or uploaded 2 video tips.

  • Contributor
  • 51 Answers

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

  • mcc99
    mcc99 Mar 07, 2008

    P.S. Here for C#'s String() object members:

    http://msdn2.microsoft.com/en-us/library...

×

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

7 Answers

MS Access database recovery


Have you tried creating a NEW MDB, and then IMPORTING the objects from the Crashed/Corrupted MDB?

This will SOMETIMES serve to rescue most if not all of the corrupted entities .

Or:
You can try:
eRepair Access is a powerful Access database recovery solution for damaged *.mdb and *.accdb files created in Access 2000 and above. Having such a tool at hand immediately after a database file corruption incident may save you a great deal of time, nerve and, of course, an ample amount of money that would otherwise be paid to third-party recovery services. With eRepair Access, you don't need to depend on anyone and entrust your Access data (often quite sensitive) into somebody else's hands. You don't have to wait. You don't have to call it a day knowing that the damaged Access file will not be restored (if at all) until tomorrow. With eRepair Access, you can be back in the game within minutes!

For more information: http://access.erepairtools.com/

If doesn't help, look here: http://www.filerepairforum.com/forum/microsoft/microsoft-aa/access/933-ms-access-database-recovery

Feb 05, 2015 | Microsoft Office Professional 2007 Full...

3 Answers

What is SQL?


It is a special purpose programing language. Computer language you will never use, unless you are into servers or programing type software

Jan 27, 2015 | Oracle 10g Database Standard (ODBSEONUPP0)

1 Answer

I want to learn that how can i connect my HTML page with my DATABASE created in MS ACCESS so that i can fill my table in HTML page directly-


1. You can use Pages option in MS Access. The page in MS Access is the web page in MS Access which allows you to access database in MS Access database.

2. You can use MS Office Front Page application and use the Form builder and connect your database in that.

3. You can also use Google Apps Business Solution for this however the database will not remain in MS Access but will remain in Docs online.

4. You can use .net application developer for this as well but needs expertise in that.

Mar 09, 2010 | Microsoft Office Standard for PC

1 Answer

Connection between html and ms access


HTML page is static, means it will not interact with the database. It just shows what has been written to it.

Regarding your question, you have to use server-side scripting i.e. JSP/Servlet, ASP.NET, PHP etc.

To learn more about server-side programming see the below site.
http://en.wikipedia.org/wiki/Server_side_scripting

Sep 21, 2009 | Microsoft Office Standard for PC

7 Answers

Undelete records from access table


ou can try to use third party Access recovery utility to restore your lost and damaged data from .mdb files. For more details about this software:-
Access File Recovery

Apr 17, 2009 | Microsoft Access 2000 (077-01277) for PC

4 Answers

How get sql data backup


there is facility in enterprise manager to take back of database!

Feb 04, 2009 | Keystone Active Server Pages (ASP)/Visual...

1 Answer

Creation of a dynamic web page


Okay, you can't do that with just Office 2003 professional. You'll need to install and configure the dotnet framework on your machine first, and then you could use infopath to create forms to work with, say, something like MS Sharepoint. You could use MS Frontpage to create an online form and link it with an Access database, but you will not need the dot net framework for that. It's easy and Frontpage is pretty intuitive.

Here are the basic instructions for using MS Frontpage: http://office.microsoft.com/en-us/frontpage/HP052812481033.aspx

You will also need webspace or a webhost that will support Microsoft ASP web hosting.

If you haven't done this before, it may be easier to get a professional do it for you, using either Microsoft or PHP/MySQL based technologies. It will certainly be time efficient.

Oct 18, 2008 | Microsoft Office 2003 Basic Edition...

1 Answer

Help for project


Saang,

It is a really bad idea to use Office Automation on a web server, your application will not be scalable and will be full of problems. Trust me, I have already spent hundreds of dollars with Microsoft Tech support for this very thing. I code commercial applications for a living, best thing to do is buy an application that creates office documents for you easily through asp.net. I have used a product from Aspose and it has done great. You can download a free trial to check it out.

http://www.aspose.com/categories/ssrs-rendering-extensions/aspose.words-for-reporting-services/default.aspx

It will save you lots of time coding as well, because they make it very easy to customize your documents.

Hope this helps!

Mar 18, 2008 | Microsoft Word 2000 for PC

1 Answer

MS access


Hi,
Have you tried changing your Regional settings in Control Panel? This should change your language in all MS Applications.

Best of luck
DeltaC

Oct 11, 2007 | Microsoft Office Standard for PC

3 Answers

Connecting html form to Ms-access data base


If, as I suspect, this is for a web form, then it effectively can't be done on a "proper" web server. This is because you cannot install MS Office on an MS server OS (e.g. Server 2003). You need to use MS SQL Server or MySQL instead. If this is for very limited use (i.e. only a few clients at a time), you can use XP running IIS but this is really not a good idea. The sedurity implications don't bear thinking about :) Linking a web page to Access can probably be done using ASP (never even thought of trying it - anyone else here know for sure?) If you are using a Linux web server then it's totally out of the question. Use Webmin or PHPMySQL to set up a MySQL database & PHP to code the linkage between the page and the DB. There are plenty of tools out there that will automate this for you, some of them Open Source and therefore free to acquire.

Sep 26, 2007 | Microsoft Office Standard for PC

Not finding what you are looking for?
Business & Productivity Software Logo

Related Topics:

202 people viewed this question

Ask a Question

Usually answered in minutes!

Top Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18299 Answers

Tony

Level 3 Expert

2598 Answers

Are you a Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...