<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : 3 Table MS Access Relati&#111;nal Database.  P</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : 3 Table MS Access Relati&#111;nal Database.  P]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 20:11:27 +0000</pubDate>
  <lastBuildDate>Thu, 16 Jun 2005 07:07:15 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=2371</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[3 Table MS Access Relati&#111;nal Database.  P : Hi,  With your UPDATE query --...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2371&amp;PID=7104&amp;title=3-table-ms-access-relational-database-p#7104</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 2371<br /><strong>Posted:</strong> 16 June 2005 at 7:07am<br /><br />Hi,<br /><br />With your UPDATE query -- set square brackets around each field name, especially around &#091;Date&#093; field, which is also seems to be the reserved word.<br /><br />--<br />WBR,<br />Serge]]>
   </description>
   <pubDate>Thu, 16 Jun 2005 07:07:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2371&amp;PID=7104&amp;title=3-table-ms-access-relational-database-p#7104</guid>
  </item> 
  <item>
   <title><![CDATA[3 Table MS Access Relati&#111;nal Database.  P : I have designed a MS Access Database...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2371&amp;PID=7056&amp;title=3-table-ms-access-relational-database-p#7056</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1232">jetski4419</a><br /><strong>Subject:</strong> 2371<br /><strong>Posted:</strong> 13 June 2005 at 3:53pm<br /><br /><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">I have designed a MS Access Database with three tables: CUSTOMERS, BOOKINGS &amp; HOLIDAYS. <BR><BR>CUSTOMERS has a Primary Key called UCI. <BR><BR>BOOKINGS has a Primary key called &#091;Number&#093;. Two Foreign keys: UCI (link to CUSTOMERS) &amp; Code (link to HOLIDAYS). <BR><BR>HOLIDAYS has a Primary Key called Code. <BR><BR>The Database has one-to-many Relationships with Referential Integrity and checked cascade UPDATE and DELETE (The many relationship for both links being on the BOOKINGS table). <BR><BR>I have designed a GUI using vb.NET (Visual Studio) The connection to the Database is via Microsoft Jet 4.0 OLE DB Provider and I have got the following Datasets to work on both the CUSTOMERS and HOLIDAYS tables: SELECT, INSERT, DELETE, UPDATE records. <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">On coming to the BOOKINGS table (which appears to be an INNER JOIN) I've got the SELECT and DELETE records to work, but I'm having major problems getting the INSERT and UPDATE to work. View the SQL Statements<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>below:<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana">I have now generated a SELECT query by going through the OleDbAdapter process and the Following query was produced and works fine: <BR><BR>"SELECT BOOKINGS.*, CUSTOMERS.UCI AS Expr1, HOLIDAYS.Code AS Expr2 FROM ((BOOKINGS INNER JOIN CUSTOMERS ON BOOKINGS.UCI = CUSTOMERS.UCI) INNER JOIN HOLIDAYS ON BOOKINGS.Code = HOLIDAYS.Code) " </SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt">&nbsp;</P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><BR>I’m problems with the INSERT Statement, the syntax is: <BR><BR>"INSERT INTO BOOKINGS, CUSTOMERS.UCI AS Expr1, HOLIDAYS.Code AS Expr2 FROM ((BOOKINGS INNER JOIN CUSTOMERS ON BOOKINGS.UCI = CUSTOMERS.UCI) INNER JOIN HOLIDAYS ON BOOKINGS.Code = HOLIDAYS.Code )" _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;  " values('" &amp; txtNumber.Text &amp; "', '" &amp; txtUCI.Text &amp; "','" &amp; txtCode.Text &amp; "','" &amp; txtDate.Text &amp; "','" &amp; txtAdult.Text &amp; "','" &amp; txtChild.Text &amp; "','" &amp; txtDeposit.Text &amp; "','" &amp; txtBalance.Text &amp; "','" &amp; txtCost.Text &amp; "')" <BR><BR>There is no error on submitting the INSERT, but the record is not being saved into the Database. <BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN-GB; mso-fareast-: EN-GB; mso-bidi-: AR-SA"><BR>I am also having problems with the UPDATE Satement, the syntax is: <BR><BR>"UPDATE BOOKINGS SET &#091;Number&#093; = '" &amp; txtNumber.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "UCI = '" &amp; txtUCI.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Code = '" &amp; txtCode.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Date = '" &amp; txtDate.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Adult = ' " &amp; txtAdult.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Child = ' " &amp; txtChild.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Deposit = ' " &amp; txtDeposit.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Balance = ' " &amp; txtBalance.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "', " &amp; "Cost = ' " &amp; txtCost.Text _ <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&amp; "' WHERE &#091;Number&#093; = '" &amp; txtNumber.Text &amp; "'" <BR><BR>The error for the UPDATE is: 'Syntax error in UPDATE Statement. <BR></SPAN></P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN-GB; mso-fareast-: EN-GB; mso-bidi-: AR-SA"><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><BR>I have attached the relevent vb.NET Forms (Not the whole Project) and the Database, I hope somebody can help me. I'm tearing my hair out and I didn't have much to start with anyway</P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt">&nbsp;</P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt">Regards jetski4419</SPAN></P><P><A href="http://forum.codejock.com/uploads/jetski4419/2005-06-13_155155_vb.NET_DB_Quest.zip" target="_blank">2005-06-13_155155_vb.NET_DB_Quest.zip</A></P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Mon, 13 Jun 2005 15:53:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2371&amp;PID=7056&amp;title=3-table-ms-access-relational-database-p#7056</guid>
  </item> 
 </channel>
</rss>