Before anything, I need to tell my Software Environment as follows.

Installed Software :- SQL Server Compact 3.5 Books Online ENU SQL Server Compact SP2 ENU SQL Server Compact 3.5 SP2 x64 ENU MS Office Enterprise 2007 MS .NET Framework 4.5.2 CompactView 1.4.12.0 ActivePerl Ver 5.24.0.2400 (x64) OS : Windows 7 Pro x64

I installed IIS 7.5.7600.16385 and configured it properly for use with ActivePerl. Apart from that, I changed Physical Path of Site to E:\PUCC. The PUCC Folder has been assigned proper security for IUSR and IIS_IUSRS as FULL CONTROL. I tested IIS for use with PERL and succeeded.

I've 2 .SDF Files (Password Protected) stored in PUCC\DB Folder. As I know the Password, I can access both the Files through CompactView. However I cannot access it through ActivePerl. Whenever, I run PERL SCRIPT from Command Prompt, following errors popped up. My ultimate goal is to furnish the Tables with specific Rows, Columns in Web Browser through IIS.

PERL Code:

01 use strict; 02 use warnings; 03 use DBI; 04 05 my $user=""; 06 my $pass="myPass"; 07 08 my $dbh = DBI->connect("dbi:ADO:Provider=Microsoft.SQLSERVER.CE.OLE +DB.3.5;Data Source=E:\\PUCC\\DB\\D_stud.sdf", $user, $pass); 09 10 11 my $sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.TABLES WH +ERE TABLE_TYPE = 'TABLE'"); 12 13 $sth->execute(); 14 15 while (my $href = $sth->fetchrow_hashref()) { 16 print $href->{TABLE_NAME} . "\n"; 17 }

ERROR Details: DBI connect('Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=E:\PUCC\DB\D_stud.sdf','',...) failed: Can't Open Connection 'Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=E:\PUCC\DB\D_stud.sdf' Package : DBD::ADO::dr Filename : C:/Perl64/site/lib/DBD/ADO.pm Line : 158 Last error : -2147217887 OLE exception from "ADODB.Connection": Provider could not set DATASOURCE, USERID, or PASSWORD property. Win32::OLE(0.1712) error 0x80040e21 in METHOD/PROPERTYGET "Open" at test.pl line 8. Can't call method "prepare" on an undefined value at test.pl line 11. Can someone help me out of the Problem?


In reply to Re^4: SQL CE on Windows 7 by talk2chakra
in thread SQL Server Compact Edition (SQL CE) on Windows 7 (64bit) by ig

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.