473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What is the problem with my pages??

Hi guys. Just new here and I really need a big help on this project of mine. We are using visual studio 2005 and SSMSE for this project. I had already created some pages which is capable of inserting and updating the values on the sql server. After inserting and updating it will redirect to another page to view the result. When I add a homepage, something just mess up. When I insert a new items for the table, it prompts a message, DBnulls cannot be converted to type integer. When I try to check at the sql tables, the data was inserted but I was not able to view the result on the other page. :`( :`( :`(
Please help, Im just a beginner in this field and I really want to learn more...
Feb 26 '10 #1
5 1337
jhardman
3,406 Expert 2GB
Frank,

You have posted in the classic ASP forum (file extension .asp or .jsp, languages supported: VBScript and JScript), but I see you were using VS2005 as your IDE. Should this be moved to the ASP.NET forum (file extension .aspx etc, all .net languages supported)?

Jared
Feb 26 '10 #2
Yeah sure. Sorry about the mistake. Just new on this field. Thanks so much...
Feb 26 '10 #3
semomaniz
210 Expert 100+
Can you please post you code for further help?
Feb 26 '10 #4
jhardman
3,406 Expert 2GB
no problem Frank.

Jared
Feb 27 '10 #5
Frinavale
9,735 Expert Mod 8TB
When retrieving information from a database you should always check to make sure it is not DBNull before you attempt to use it....

You should also consider properly casting between data types (are you using C# or VB.NET?) to avoid problems like this. If you are expecting an Integer from the database then you should cast the data retrieved into that type.

Sometimes there is nothing in a field retrieved by the database. In this case the database will return you DBNull. You can use the DBNull class to make sure that the data returned is not DBNull before you attempt to cast it or use it. You need to use the DBNull.Value to do this.

I would be able to help you better if you posted the code that isn't working (please remember to use code tags when posting code).

-Frinny
Mar 1 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Paul | last post by:
Title: What are the Consequences of Aspx page separate from app DLL Hi JL; I am working on a big asp.net application. When we migrate the dll (or dlls) to the production server, all users who are...
86
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that:...
9
by: Just D. | last post by:
All, Did anybody see this strange effect? The web application is written in C#, ASP.NET, SQL, T-SQL, etc. A pretty usual stuff, complicated enough, but works fine until... Here is a question....
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
133
by: Alan Silver | last post by:
Hello, Just wondered what range of browsers, versions and OSs people are using to test pages. Also, since I don't have access to a Mac, will I have problems not being able to test on any Mac...
12
by: johannblake | last post by:
First off, I am NOT a beginner. I have lots of experience developing professional web sites and am a professional software developer. Unfortunately I've been out of web site development for the...
3
by: johannblake | last post by:
I'm reading up on Themes and Master Pages in ASP.NET 2.0 but I cannot seem to understand what the difference between the two are. Do Master Pages essentially end up doing what Themes do? Is...
2
by: James | last post by:
CASE 1: The following sentences were copied from the book "Administration Guide Performance". "If more pages have been written to disk, recovery of the database is faster after a system crash...
8
by: pamela fluente | last post by:
I need an opinion. I have to add NEW pages to an existing site. The site has - also - some ASPX pages. These pages, I have seen, have the following doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD...
4
by: Terry Pinnell | last post by:
I've just taken a look at some web pages I created several years ago, since when I've forgotten most of what little I knew about HTML coding. Could someone kindly take a look and advise me if...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.