Showing posts with label driving. Show all posts
Showing posts with label driving. Show all posts

Monday, March 26, 2012

This is driving me nuts

Ok, the weblog is still giving some problems. My database table fields are set to not allow nulls but I'm stil able to insert data into the fields. Now everything works fine on my computer but craps up when I upload the project.
I need some help.I think I'm going to just host my weblog on my on computer at home. EhostingBiz.com, is just not doing it for me. I create my tables and set the columns to not null, but they still allow null values. Everything works on my computer, so I know its not my code. I'm going to bed now.
Have you tried another host - a free one just to compare whether its your current.
No, I have not tried another host. Thats gonna take too much time.
All I wanna know is. How is it possible to insert null values in columns that are set to not allow null values.
Its not possible - except you can add checks which only apply to new data ignoring previous rows but cannot recall if this can apply to nullability!!!
I can't believe this can happen against the way SQL Server works.
Can you post you tabel schema?
I would bet that it might be a database setting that is doing this for you. I would go to the database forum and ask why this isn't working like you want it.

I always verify the data I am throwing at the database anyway, I can usually head off reads and writes that won't work based on the rules I have set. This first acts like a filter, and also as a performance enhancement because you don't have to needlessly access the database unless you are 95% sure the data is good.

If I have time today, I will check into whether or not I can do this on my DB.

Also, it would be helpful if you generated a setup script of you database and posted it here. We might be able to find a problem in there.
Originally posted by hellswraith
I would bet that it might be a database setting that is doing this for you. I would go to the database forum and ask why this isn't working like you want it.

I always verify the data I am throwing at the database anyway, I can usually head off reads and writes that won't work based on the rules I have set. This first acts like a filter, and also as a performance enhancement because you don't have to needlessly access the database unless you are 95% sure the data is good.

If I have time today, I will check into whether or not I can do this on my DB.

Also, it would be helpful if you generated a setup script of you database and posted it here. We might be able to find a problem in there.

I think thats what is happening. Another problem I have is that my RequiredValidator controls wont fire when I upload my project. As I've said before everything works fine on my computer, so this is kinda strange. To force the RequiredValidators to fire, I had to put my code in an if(Page.IsValid) block. I did'nt really want to do that since the page is posting back.

Here is the script.
If you select NO to allow nulls then you will have to supply data to be inserted into the field when a record is inserted. If you have no data to populate the field then sometimes an empty string will do.

But the easiest way I have found is to supply a default value for the field. For string fields and empty string will do. For numerics a zero. For date fields you can use GetDate() as the default or supply a non-sense date like '01-01-1900'.

And a null is a null is nothing...
Should'nt the DB throw an exception if the value is null? If I enter data from enterprise manager and leave a column empty, an exception is thrown.
OK, I am not sure what columns your having problems with. Here is what I see from the scripts...
URL and Email in the comments table are set to ALLOW null values. If these are the columns that are giving you trouble, then you need to switch them to Not Null.

Another thing I have found with ASP.Net is that a empty text box will return a empty string instead of a null value if there is nothing in it. You may be allowed to enter the data because the empty string is being passed therefore it isn't really a null value.
Originally posted by hellswraith
OK, I am not sure what columns your having problems with. Here is what I see from the scripts...
URL and Email in the comments table are set to ALLOW null values. If these are the columns that are giving you trouble, then you need to switch them to Not Null.

Another thing I have found with ASP.Net is that a empty text box will return a empty string instead of a null value if there is nothing in it. You may be allowed to enter the data because the empty string is being passed therefore it isn't really a null value.

The url and email columns are suppose to be like that. I'll have to check out what you said about the empty text box. Thanks for help.

Saturday, March 24, 2012

This page contains both secure and nonsecure items

Hi all

This has been driving me nuts for months now, if I access my site from IE
https://db.cornwall.gov.uk/PlanningApplications and then hover over one of
the 2-level menus it comes up with the message:

"This page contains both secure and nonsecure items. Do you want to display
the nonsecure items?"

I've confirmed that there are "no" nonsecure items on this site, it works ok
from Firefox but not IE.

Can someone have a look at the site and see if they get the same problem -
it's been driving me crazy - and why does it only come up when hovering over
the menu item?

Thanks all
KevYou'll find all the answers you need at:
http://blogs.msdn.com/jorman/archiv.../06/526087.aspx

it's because the popup is loaded into a non-secure iframe. A solution is
provided at the link above, but for the sake of posterity:

<script runat="server">
protected override void Render(HtmlTextWriter writer)
{
Page.ClientScript.RegisterStartupScript(typeof(Pag e),
"MenuHttpsWorkaround", Menu1.ClientID +
"_Data.iframeUrl='https://myserver/someblankpage.htm';", true);
base.Render(writer);
}
</script
--
http://www.openmymind.net/

"Mantorok" <mantorok@.mantorok.com> wrote in message
news:e27gr8$n40$1@.newsfeed.th.ifl.net...
> Hi all
> This has been driving me nuts for months now, if I access my site from IE
> https://db.cornwall.gov.uk/PlanningApplications and then hover over one of
> the 2-level menus it comes up with the message:
> "This page contains both secure and nonsecure items. Do you want to
> display
> the nonsecure items?"
> I've confirmed that there are "no" nonsecure items on this site, it works
> ok
> from Firefox but not IE.
> Can someone have a look at the site and see if they get the same problem -
> it's been driving me crazy - and why does it only come up when hovering
> over
> the menu item?
> Thanks all
> Kev
>
Thanks very much!!

Kev

"Karl Seguin [MVP]" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:Omi3JLHZGHA.4168@.TK2MSFTNGP05.phx.gbl...
> You'll find all the answers you need at:
> http://blogs.msdn.com/jorman/archiv.../06/526087.aspx
> it's because the popup is loaded into a non-secure iframe. A solution is
> provided at the link above, but for the sake of posterity:
> <script runat="server">
> protected override void Render(HtmlTextWriter writer)
> {
> Page.ClientScript.RegisterStartupScript(typeof(Pag e),
> "MenuHttpsWorkaround", Menu1.ClientID +
> "_Data.iframeUrl='https://myserver/someblankpage.htm';", true);
> base.Render(writer);
> }
> </script>
> --
> http://www.openmymind.net/
>
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:e27gr8$n40$1@.newsfeed.th.ifl.net...
>> Hi all
>>
>> This has been driving me nuts for months now, if I access my site from IE
>> https://db.cornwall.gov.uk/PlanningApplications and then hover over one
>> of
>> the 2-level menus it comes up with the message:
>>
>> "This page contains both secure and nonsecure items. Do you want to
>> display
>> the nonsecure items?"
>>
>> I've confirmed that there are "no" nonsecure items on this site, it works
>> ok
>> from Firefox but not IE.
>>
>> Can someone have a look at the site and see if they get the same
>> problem -
>> it's been driving me crazy - and why does it only come up when hovering
>> over
>> the menu item?
>>
>> Thanks all
>> Kev
>>
>>
>>
>>

This page contains both secure and nonsecure items

Hi all
This has been driving me nuts for months now, if I access my site from IE
https://db.cornwall.gov.uk/PlanningApplications and then hover over one of
the 2-level menus it comes up with the message:
"This page contains both secure and nonsecure items. Do you want to display
the nonsecure items?"
I've confirmed that there are "no" nonsecure items on this site, it works ok
from Firefox but not IE.
Can someone have a look at the site and see if they get the same problem -
it's been driving me crazy - and why does it only come up when hovering over
the menu item?
Thanks all
KevYou'll find all the answers you need at:
http://blogs.msdn.com/jorman/archiv.../06/526087.aspx
it's because the popup is loaded into a non-secure iframe. A solution is
provided at the link above, but for the sake of posterity:
<script runat="server">
protected override void Render(HtmlTextWriter writer)
{
Page.ClientScript.RegisterStartupScript(typeof(Page),
"MenuHttpsWorkaround", Menu1.ClientID +
"_Data.iframeUrl='https://myserver/someblankpage.htm';", true);
base.Render(writer);
}
</script>
http://www.openmymind.net/
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:e27gr8$n40$1@.newsfeed.th.ifl.net...
> Hi all
> This has been driving me nuts for months now, if I access my site from IE
> https://db.cornwall.gov.uk/PlanningApplications and then hover over one of
> the 2-level menus it comes up with the message:
> "This page contains both secure and nonsecure items. Do you want to
> display
> the nonsecure items?"
> I've confirmed that there are "no" nonsecure items on this site, it works
> ok
> from Firefox but not IE.
> Can someone have a look at the site and see if they get the same problem -
> it's been driving me crazy - and why does it only come up when hovering
> over
> the menu item?
> Thanks all
> Kev
>
>
Thanks very much!!
Kev
"Karl Seguin [MVP]" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:Omi3JLHZGHA.4168@.TK2MSFTNGP05.phx.gbl...
> You'll find all the answers you need at:
> http://blogs.msdn.com/jorman/archiv.../06/526087.aspx
> it's because the popup is loaded into a non-secure iframe. A solution is
> provided at the link above, but for the sake of posterity:
> <script runat="server">
> protected override void Render(HtmlTextWriter writer)
> {
> Page.ClientScript.RegisterStartupScript(typeof(Page),
> "MenuHttpsWorkaround", Menu1.ClientID +
> "_Data.iframeUrl='https://myserver/someblankpage.htm';", true);
> base.Render(writer);
> }
> </script>
> --
> http://www.openmymind.net/
>
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:e27gr8$n40$1@.newsfeed.th.ifl.net...
>