473,597 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VFP9 and SQL 2005 using VFP remote view Cannot insert the value NULL into column

Just trying to upsize using VFP 9 with SQL 2005 using VFP remote
views. One in particular keeps coming up and saying Cannot insert the
value NULL into column, when I really don't think I am inserting a
NULL value. Oddly sometimes it works but I don't know why. Can anyone
suggest anything else I can try? Perhaps this is the wrong group I'm
posting to - it was just the one that came up with other errors giving
the same message, but none of these seem to be the same?

I created a new SQL table and VFP remote view (code below)

then I run:
SELECT fund_code, "GB" as countryCode, 1 as derived ;
FROM factsheets!fund s ;
WHERE fd_type_cd in ("UKA","OIC","I NS","UKP","ITR" ) ;
AND fund_code+"GB" NOT in ;
(SELECT fund_code+Count ryCode FROM RegisteredForSa leIn) ;
INTO cursor TmpReg

Then
INSERT INTO RegisteredForSa leIn (fund_code, CountryCode, derived) ;
SELECT fund_code, CountryCode, Derived FROM TmpReg

I've tried adding to INSERT
WHERE !isnull(fund_co de)
and then
WHERE EXISTS(SELECT fund_code, CountryCode, Derived FROM TmpReg)

Yesterday resetting the UpdateName for the fund_code field worked, but
not today.

I have set and reset
keyfieldList (fund_code, Countrycode)
set all fields as updateable
set fund_code, Countrycode as Keyfield

I have 5 other tables that work ok.

*************** *************** *************** *************** *************** ***
This is the SQL used to create table
USE [dbFactSheetColl Dev]
GO
/****** Object: Table [dbo].[fsRegisteredFor SaleIn] Script Date:
05/30/2007 11:58:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFI ER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[fsRegisteredFor SaleIn](
[FundCode] [char](10) COLLATE Latin1_General_ CI_AS NOT NULL,
[CountryCode] [char](2) COLLATE Latin1_General_ CI_AS NOT NULL,
[Derived] [smallint] NOT NULL CONSTRAINT
[DF_fsRegistered ForSaleIn_Deriv ed] DEFAULT ((0)),
CONSTRAINT [PK_fsRegistered ForSaleIn] PRIMARY KEY CLUSTERED
(
[FundCode] ASC,
[CountryCode] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
*************** *************** *************** *************** *************** ******
Create VFP view
CREATE SQL VIEW RegisteredForSa leIn ;
REMOTE CONNECTION dbFactsheetColl SHARE ;
as select FundCode as fund_code, CountryCode, Derived ;
from dbo.fsRegistere dForSaleIn

*************** *************** *************** *************** *************** ******

May 31 '07 #1
0 2073

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2309
by: btober | last post by:
I'm finding that column defaults are not being assigned to nulls when I do an insert by way of a an ON INSERT rule on a view. For example, the following script \set ON_ERROR_STOP ON \c template1 --DROP DATABASE testdb; CREATE DATABASE testdb; \c testdb
7
6971
by: Serge Rielau | last post by:
Hi all, Following Ian's passionate postings on problems with ALTOBJ and the alter table wizard in the control center I'll try to explain how to use ALTOBJ with this thread. I'm not going to get into the GUI because it is hard to describe in text. First of all what is the purpose of ALTOBJ()? This procedure was created mostly for ISVs who need to do produce change scripts to upgrade application from release to release, but it can also
4
2273
by: onecorp | last post by:
I have a SQL table comprised of 31 columns. The first column is simply an id column, the next 30 columns are labelled ,.... The numerical columns have a tinyint type and the data stored is either 1 or null. I wish to count the number of times a one appears in one column simultaneously with another column: eg count the number of times 1 appears in column and 1 also appears in column in the same row:
6
2933
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1) Constraint pk_table1 Primary Key,
0
7971
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7893
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8276
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8259
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6698
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3932
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2408
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1243
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.