Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2015 > Beginning Visual Basic 2015
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old March 4th, 2016, 06:00 PM
Authorized User
Points: 55, Level: 1
Points: 55, Level: 1 Points: 55, Level: 1 Points: 55, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2015
Location: Menan, ID
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:
(au_id,au_lname,au_fname,phone,address,city,state, zip,contract)
('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.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01: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

All times are GMT -4. The time now is 11:46 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.