<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://cs.pervasive.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pervasive PSQL V9</title><link>http://cs.pervasive.com/forums/9.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48513.aspx</link><pubDate>Tue, 23 Aug 2011 14:20:42 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48513</guid><dc:creator>deacan</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48513.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48513</wfw:commentRss><description>Thank you.. we are definitely getting there. I have downloaded the required samples but am having trouble importing the FRM files into Visual Basic. Excuse my ignorance but is there a way of importing these sample forms into VBA? Are these samples created to be able to run in VBA as well?  When I copy and paste the code I get the error reading: Compile error: User-defined type not defined. This is for DBNamesForm.frm.</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48511.aspx</link><pubDate>Tue, 23 Aug 2011 13:37:15 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48511</guid><dc:creator>Mirtheil</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48511.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48511</wfw:commentRss><description>&lt;p&gt;Docs for DTO:&amp;nbsp; &lt;a href="http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=dto/dtointro.1.1.html" target="_blank"&gt;http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=dto/dtointro.1.1.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;On &lt;a href="http://pervasivedb.com/support/Pages/PSQLSDK-Archives.aspx" target="_blank"&gt;http://pervasivedb.com/support/Pages/PSQLSDK-Archives.aspx&lt;/a&gt; is a link for the &amp;quot;DTO SDK for PSQL v9&amp;quot;.&amp;nbsp; You&amp;#39;ll want to download that.&amp;nbsp; It should have some samples.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48510.aspx</link><pubDate>Tue, 23 Aug 2011 13:25:15 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48510</guid><dc:creator>deacan</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48510.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48510</wfw:commentRss><description>Thank you, that is very useful information...  If you wouldn&amp;#39;t mind please could you set us off in the right direction with regards to creating the Database Name in code using DTO.</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48509.aspx</link><pubDate>Tue, 23 Aug 2011 12:52:28 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48509</guid><dc:creator>Mirtheil</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48509.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48509</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You cannot connect to a PSQL database without creating at least a Pervasive Database Name.&amp;nbsp; You don&amp;#39;t need an ODBC DSN but it helps.&amp;nbsp; There is no supported way to connect to a path with PSQL ODBC or OLEDB.&amp;nbsp; &lt;/p&gt;&lt;p&gt;You can create the Database Name in code though using DTO. &amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48508.aspx</link><pubDate>Tue, 23 Aug 2011 12:48:01 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48508</guid><dc:creator>deacan</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48508.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48508</wfw:commentRss><description>Thank you for your feedback...

Please could you explain your answer further.

Just to clarify, I am trying to connect to the pervasive database without setting up an ODBC DSN. If we need to specify a serverDSN name or DBQ name wouldn&amp;#39;t that be going against the purpose of what we are trying to achieve. 

Is there a way of creating this connection only by using a connection string that points to the database path without having to set up a DSN string?
Still haven&amp;#39;t managed to get the spacing right ;)</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48507.aspx</link><pubDate>Tue, 23 Aug 2011 12:35:06 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48507</guid><dc:creator>Mirtheil</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48507.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48507</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You can use the [ code] tag or the [ quote] tag to get proper spacing.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Anyway, I see your problem:&lt;/p&gt;&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;Sub pervasiveExample() &lt;br /&gt;Dim adoConn As ADODB.Connection &lt;br /&gt;Set adoConn = New ADODB.Connection &lt;br /&gt;adoConn.ConnectionString = &amp;quot;driver={Pervasive ODBC Client Interface};DBQ=DEMODATA&amp;quot; &lt;br /&gt;adoConn.Open &lt;br /&gt;If adoConn.State = adStateOpen Then&lt;br /&gt;MsgBox &amp;quot;Welcome&amp;quot; &lt;br /&gt;Else &lt;br /&gt;MsgBox &amp;quot;Error connecting to Database.&amp;quot; &lt;br /&gt;End If &lt;br /&gt;End Sub&lt;/font&gt; &lt;/p&gt;&lt;p&gt;If you are using the &amp;quot;driver=&amp;quot;&amp;nbsp; in the connection string, you cannot use a path.&amp;nbsp; You must specify the database name (or engine DSN by using &lt;a title="1214108" class="" name="1214108"&gt;&lt;/a&gt;ServerDSN= and ServerName= for remote connections) in the connection string.&amp;nbsp; You also do not specify a Provider when using the ODBC driver.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48506.aspx</link><pubDate>Tue, 23 Aug 2011 11:41:41 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48506</guid><dc:creator>deacan</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48506.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48506</wfw:commentRss><description>Sorry but I can&amp;#39;t seem to get this message in the correct format with different paragraphs and spacing so its difficult to see. It just groups it all together into one paragraph no matter what I do.</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48504.aspx</link><pubDate>Tue, 23 Aug 2011 11:30:06 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48504</guid><dc:creator>deacan</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48504.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48504</wfw:commentRss><description>Thank you... any help would be appreciated.This is the code I am using and it may be very incomplete. The database is in a folder called TestData on my local server. 


                                                                                                                                                                                                                                                                                                                                                                             
Sub pervasiveExample()
  


                                                                                                                                                                                            

Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection
                                                                                                                                                                                               

adoConn.Provider = &amp;quot;PervasiveOLEDB&amp;quot; 
                                                                                                                                                                                               
adoConn.ConnectionString = &amp;quot;driver={Pervasive ODBC Client Interface};Data Source=C:\TestData&amp;quot;
                                                                                                                                                                                               
adoConn.Open
                                                                                                                                                                                               
If adoConn.State = adStateOpen Then
MsgBox &amp;quot;Welcome&amp;quot;
Else
MsgBox &amp;quot;Error connecting to Database.&amp;quot;
End If
                                                                                                                                                                                               
End Sub
 


                                                                                                                                                                                              
This is the error I get when I run this code:
 


                                                                                                                                                                                              
run-time error&amp;#39;-2147217837(80040e53)&amp;#39;: 
Mode, Protection Level, or unknown parameter has been set (incorrectly) in the connection string</description></item><item><title>Re: Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48503.aspx</link><pubDate>Tue, 23 Aug 2011 11:17:52 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48503</guid><dc:creator>Mirtheil</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48503.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48503</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I don&amp;#39;t have any VBA code but if you post your connection string and the actual error you are getting, we might be able to help.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Opening a DSNless connection to the Pervasive database using VBA</title><link>http://cs.pervasive.com/forums/thread/48502.aspx</link><pubDate>Tue, 23 Aug 2011 10:02:26 GMT</pubDate><guid isPermaLink="false">3741b99c-ad24-4023-9eca-ddf558b8b674:48502</guid><dc:creator>deacan</dc:creator><slash:comments>0</slash:comments><comments>http://cs.pervasive.com/forums/thread/48502.aspx</comments><wfw:commentRss>http://cs.pervasive.com/forums/commentrss.aspx?SectionID=9&amp;PostID=48502</wfw:commentRss><description>Hi there,

I&amp;#39;m very new at connecting to databases so I apologise if I&amp;#39;m not familiar with some of the terminology.

I would like to open up a DSNless connection to the pervasive database using VBA and I&amp;#39;m running into various issues. The forums that I have come across all give various bits of code which are helpful but I would like to see one full subroutine to see how it all fits together. By trying to apply different bits of code to my code I end up running into various error codes.

Therfore could someone please post an example of the full code to open a connection and create a recordset. It would be most appreciated.</description></item></channel></rss>