Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2015 > Beginning Visual Basic 2015
|
Beginning Visual Basic 2015
This is the forum to discuss the Wrox book Beginning Visual Basic 2015 by Bryan Newsome; ISBN: 978-1-119-09211-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning Visual Basic 2015 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 4th, 2016, 07:00 PM
Authorized User
 
Join Date: Jan 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Question Ch 12 - SQL Can't write to database pubs?

Ch 12 page 422. I can't insert the new authors. I get a an error:
The INSERT statement conflicted with the CHECK constraint "CK__authors__au_id__108B795B". The conflict occurred in database "pubs", table "dbo.authors", column 'au_id'.
The statement has been terminated.
hers the code I typed for the first insertion:
INSERT INTO authors
(au_id,au_lname,au_fname,phone,address,city,state, zip,contract)
VALUES
('111-22-333','Smitty','Briana','555 123-1234','123 Main St','Clemmons', 'NC', '27222',1)

Here's the results of the Constraint check I made:
CK__authors__au_id__108B795B ([au_id] like '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]')

My code looks like it fits the bill to me. Could it be that I'm not authorized write access to the pubs database? Tried to check, but couldn't figure out how to even see that.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 12 Database Snapshots ... creating snapshot get inc BOOK: Professional Microsoft SQL Server 2012 Integration Services 0 July 29th, 2015 01:35 PM
Ch. 12 Update-Database command LindaPowers BOOK: Professional ASP.NET MVC 5 2 January 25th, 2015 02:59 AM
Ch. 12 Connecting to the SQL Server Sample Database KingJames978 BOOK: Beginning ASP.NET 4 : in C# and VB 7 April 6th, 2012 02:39 AM
SQL Exercises for PUBS and Northwind SQL Sevrer database JaideepC99 SQL Language 3 October 10th, 2011 04:17 AM
Pubs Database pro-logic ADO.NET 0 July 10th, 2003 11:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.