<?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 : SQL Tables?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : SQL Tables?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 29 May 2026 23:12:27 +0000</pubDate>
  <lastBuildDate>Thu, 24 Jul 2008 21:27:00 +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=11519</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[SQL Tables? : 1) When you set the CalendarControl.SetDataProvider...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38870&amp;title=sql-tables#38870</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1200">Stilki</a><br /><strong>Subject:</strong> 11519<br /><strong>Posted:</strong> 24 July 2008 at 9:27pm<br /><br />1)<DIV>When you set the CalendarControl.SetDataProvider "Provider=custom;" <BR>what happens is that the CalendarControl will RaiseEvents like DoCreatexxx, DoReadxxx etc.<BR>You need to intercept these events and read or write to your SQLServer connection.</DIV><DIV><BR>Here is a link to: <a href="http://www.c&#111;nnecti&#111;nstrings.com" target="_blank">http://www.connectionstrings.com</A> where you can find many more sample connection strings</DIV><DIV>Look at the OpenProvider function in frmMain and change to the following...<BR>&nbsp;<BR>Public Sub OpenProvider(ByVal eDataProviderType As CodeJockCalendarDataType, ByVal strConnectionString As String)<BR>&nbsp;&nbsp; dim strConnect As String</DIV><DIV>&nbsp;&nbsp; 'Here is a connection string to a sql server database. <BR>&nbsp;&nbsp; strConnect=""<BR>&nbsp;&nbsp; strConnect= strConnect &amp; ""Provider=SQLOLEDB;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Driver={SQL Server};"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Integrated_Security=False;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Persist Security Info=false;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Connect Timeout=30;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "DataTypeCompatibility=80;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Trusted Connection=false;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Application Name= My_ApplicationName;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Network=DBMSSOCN;(Local)\SQLEXPRESS,1455;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "User ID=MyUser_ID;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Password=MyUser_Password;"<BR>&nbsp;&nbsp; strConnect= strConnect &amp; "Initial Catalog=MySQLServer_Database;"</DIV><DIV>&nbsp;&nbsp;&nbsp; </DIV><DIV>&nbsp;&nbsp; Set m_pCustomDataHandler = Nothing<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ' SQL Server provider<BR>&nbsp;&nbsp;&nbsp; Set m_pCustomDataHandler = New providerSQLServer<BR>&nbsp;&nbsp;&nbsp; m_pCustomDataHandler.OpenDB strConnect<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; m_pCustomDataHandler.SetCalendar CalendarControl&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CalendarControl.SetDataProvider "Provider=custom;"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If eDataProviderType = cjCalendarData_SQLServer Or eDataProviderType = cjCalendarData_MySQL Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarControl.DataProvider.CacheMode = xtpCalendarDPCacheModeOnRepeat<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Not CalendarControl.DataProvider.Open Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarControl.DataProvider.Create<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; m_eActiveDataProvider = eDataProviderType<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CalendarControl.Populate<BR>&nbsp;&nbsp;&nbsp; wndDatePicker.RedrawControl</DIV><DIV>End Sub</DIV><DIV>&nbsp;</DIV><DIV>In the providerSQLServer class change the OpenDB function to...</DIV><DIV>Public Sub OpenDB(ByVal strConnection As String)<BR>On Error GoTo err1<BR>&nbsp;&nbsp;&nbsp; m_Connection.Open strConnection <BR>&nbsp;&nbsp;&nbsp; m_bOpened = True</DIV><DIV>err1:<BR>&nbsp;&nbsp;&nbsp; If Err.Number &lt;&gt; 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_bOpened = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "Cannot open SQL Server DB: " &amp; Err.Description<BR>&nbsp;&nbsp;&nbsp; End If<BR>End Sub</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>2)</DIV><DIV>You will need to create the tables and fields in in your sql server database yourslef. I have not tested if the following in the OpenProvider function will create the tables if you are connected to a sql server database.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; If Not CalendarControl.DataProvider.Open Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarControl.DataProvider.Create<BR>&nbsp;&nbsp;&nbsp; End If<BR></DIV><DIV>You might want to try and see for yourself.</DIV><DIV>&nbsp;</DIV><DIV><BR>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 24 Jul 2008 21:27:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38870&amp;title=sql-tables#38870</guid>
  </item> 
  <item>
   <title><![CDATA[SQL Tables? : I see that and I saw that demo......]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38835&amp;title=sql-tables#38835</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11519<br /><strong>Posted:</strong> 24 July 2008 at 8:34am<br /><br />I see that and I saw that demo... but doesnt this demo use XML and not a SQL Server? My confusion comes in here....<br><br>1) If I am only specifying <b>connectionString="provider=custom"</b> then where (and how) do I specify the actual SQL server address, port, etc? Do I need to setup an actual ODBC Provider? That would be less than ideal - I have constants with all that stuff in it anyway... can someone provide a sample connection string for a sql server?<br><br>2) Do the classes actually create the tables/fields required to hold the data?<br>]]>
   </description>
   <pubDate>Thu, 24 Jul 2008 08:34:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38835&amp;title=sql-tables#38835</guid>
  </item> 
  <item>
   <title><![CDATA[SQL Tables? : There is a sample in the Calendar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38797&amp;title=sql-tables#38797</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1200">Stilki</a><br /><strong>Subject:</strong> 11519<br /><strong>Posted:</strong> 24 July 2008 at 12:40am<br /><br />There is a sample in the Calendar samples on how to do this. Check out the VB\Calendar sample and look in the code for 'Provider=Custom' in frmMain. <DIV>Also there&nbsp;are two&nbsp;classes that do the work:</DIV><DIV>providerSQLServer.cls</DIV><DIV>SQLDataHelper.cls</DIV>]]>
   </description>
   <pubDate>Thu, 24 Jul 2008 00:40:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38797&amp;title=sql-tables#38797</guid>
  </item> 
  <item>
   <title><![CDATA[SQL Tables? : I am trying to get the calendar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38639&amp;title=sql-tables#38639</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11519<br /><strong>Posted:</strong> 21 July 2008 at 2:07pm<br /><br />I am trying to get the calendar control to work with my SQL server as the backend, but I can not find any documentation as to the Tables (and their fields) that need to exist in order for this to work properly... It seems I am able to connect to the database OK and set the Calendar.Dataprovider... What next???<br><br>Any guidance would be greatly appreciated.]]>
   </description>
   <pubDate>Mon, 21 Jul 2008 14:07:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11519&amp;PID=38639&amp;title=sql-tables#38639</guid>
  </item> 
 </channel>
</rss>