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
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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 4th, 2016, 07: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:
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.
Reply With Quote
Reply


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 02: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 03:39 AM
SQL Exercises for PUBS and Northwind SQL Sevrer database JaideepC99 SQL Language 3 October 10th, 2011 05:17 AM
Pubs Database pro-logic ADO.NET 0 July 11th, 2003 12:50 AM



All times are GMT -4. The time now is 04:58 PM.


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