Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > BOOK: Beginning InfoPath 2003
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning InfoPath 2003
This is the forum to discuss the Wrox book Beginning InfoPath 2003 by F. Scott Barker; ISBN: 9780764579486
ISBN: 0-7645-7948-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning InfoPath 2003 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 June 16th, 2005, 07:23 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sample Code is frustratingly broken

Heads up....

The sample code is screwy starting with Chapter 6. (I am up to chapter 7 and that does not work either). Mr. Barker must have prepared the files incorrectly because I get A) an error message when I try to open the sample file (It says that I need to republish); and B) terminates when I try to preview the document (actually it prompts me for login credentials - supposedly for the machine the forms were originally created on.)

I just filed a bug report with Wiley... but hope the Scott is reading this and can provide me with a work around ASAP.

I think the book is great... it is very frustrating being slowed down in getting through it by not being able to do the "Try it out" sections.
Reply With Quote
  #2 (permalink)  
Old June 17th, 2005, 09:54 AM
jminatel's Avatar
Wrox Staff
Points: 13,964, Level: 51
Points: 13,964, Level: 51 Points: 13,964, Level: 51 Points: 13,964, Level: 51
Activity: 9%
Activity: 9% Activity: 9% Activity: 9%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,836
Thanks: 51
Thanked 105 Times in 81 Posts
Default

Ken:
Wiley support (Charul Shukla) is providing you this work around directly, but I'm posting it here too in case anyone else is having the problem. If this doesn't solve it, of course continue to work with support and/or post here and we'll also see if Scott can jump in with any additional thoughts:

We have tested the code the customer is referring to and we understand what is probably happening. Once the code is downloaded and saved in some location on the hard drive and when the Chapter 6 Start.xsn is ran, it shows the following error message.

“This form has been published to one location and then saved or moved to a different location. Before deploying this form to your users, you should publish it again.”

There are two approaches to solve this problem as follows:

Approach 1

Click OK to open the form and then publish it again on exactly the same location from where you opened it. While doing so, InfoPath will ask you for overwriting the already existed form. Proceed with overwriting procedure and published it.

Once you published the form on the same location, close the form and now open it again, this time it will not show any error and will work fine.

Remember: You might need to follow this approach in all the forms showing this error.


Approach 2

Create a New Folder named “Books” on your C drive

Create two more subfolders in “books” folder named "InfoPath" and "sample" by following the directory structure given below

C:\Books\Infopath\Sample
Copy all the folders of download code in the samples folder.

After completing all these steps, you will be able to use the code without any problem.


Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: Professional DotNetNuke ASP.NET Portals
Reply With Quote
  #3 (permalink)  
Old June 17th, 2005, 12:04 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope... that still does not solve the problem....

I started from scratch from a recently rebooted pc. I
opened Infopath/design a form/on this computer/...Chapter 7/Chapter 7 intro.xsn

It asks me to republish.... I do.. and chose "overwrite" option.

It opens.

I try to preview and it asks for the $%@#$ logon credentials again.

Just to be safe, I close the application, and do the above again. This time it opens without asking me to republish, but it still fails when I try to preview the document

Please confirm that you have the same behaviour.

Any work around suggestions for the previewing issue?

ken


Reply With Quote
  #4 (permalink)  
Old June 17th, 2005, 12:10 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Workaround #2 seems to work. :-)


Reply With Quote
  #5 (permalink)  
Old June 17th, 2005, 08:31 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ken,

I am going to try and get you an answer by tomorrow. Unfortunately, of course everything works fine for me on my machine. I will have to create a VPC to try and cause the error for myself, and then will have an answer for you. I have had this occur to me in the past for other forms, but can't remember what i did to fix them. I will get back to you.

Sorry for the hassles,

Scott

Reply With Quote
  #6 (permalink)  
Old June 19th, 2005, 04:59 PM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I work with Scott quite frequently on projects, my opinion here is the first Error was just the basic Infopath scenario where you must overwrite the template you are working with. The second message box you were getting is because InfoPath can no longer find the Access Database that came with chapter 6. Therefore, the first textbox will have a path in it, that is probly something along the lines of

C:\Books\InfoPath\Samples\Chapter 4\Chapter 4.mdb

As that is probably not the location you are running this from you will need to either open up the form again in design view and change the datasource, open up the xml and modify datasource path (Not recommeded), or just copy the database to the location infopath can find it. (Recommended if you are in a pinch, as this is the quickest workaround)

Thanks to all

Mark Woodlief


Reply With Quote
  #7 (permalink)  
Old June 24th, 2005, 12:30 AM
Registered User
 
Join Date: Jun 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ken, did what Mark suggest work for you?

Scott

Reply With Quote
  #8 (permalink)  
Old March 27th, 2006, 05:28 PM
Registered User
 
Join Date: Mar 2006
Location: , , USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried both of these workarounds, and I'm still getting an error when I try to preview the forms in Chapters 4, 6, and 7. The error is - InfoPath cannot run the specified query (Details):InfoPath cannot connect to the data source.
Safety settings on this computer prohibit accessing a data source on another domain.

Does anyone have a solution? Thanks in advance!

- Dave
Reply With Quote
  #9 (permalink)  
Old March 28th, 2006, 03:40 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by D_E_Pitts
 I have tried both of these workarounds, and I'm still getting an error when I try to preview the forms in Chapters 4, 6, and 7.  The error is - InfoPath cannot run the specified query  (Details):InfoPath cannot connect to the data source.
Safety settings on this computer prohibit accessing a data source on another domain.

Does anyone have a solution?  Thanks in advance!

- Dave
Reply With Quote
  #10 (permalink)  
Old March 28th, 2006, 03:43 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I copied and pasted the entire Chapter 6 folder to the new location and it worked.

Quote:
quote:Originally posted by SallyB
 
Quote:
quote:Originally posted by D_E_Pitts
Quote:
 I have tried both of these workarounds, and I'm still getting an error when I try to preview the forms in Chapters 4, 6, and 7.  The error is - InfoPath cannot run the specified query  (Details):InfoPath cannot connect to the data source.
Safety settings on this computer prohibit accessing a data source on another domain.

Does anyone have a solution?  Thanks in advance!

- Dave
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
ZIP with code is broken! CROmagnon BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0 2 May 23rd, 2008 11:28 AM
want sample code mohiddin52 Access VBA 2 December 16th, 2006 03:54 AM
Need Sample code okshilato SQL Server 2005 0 March 28th, 2006 09:41 AM
Sample Code mirouvor Java Databases 1 January 2nd, 2006 01:28 PM
Where the sample code? rbtcx BOOK: Professional C#, 2nd and 3rd Editions 5 August 21st, 2003 02:58 AM



All times are GMT -4. The time now is 05:36 AM.


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