Get files from USB cameraHi
I'm using delphi 2007 on windows VISTA and I'm having great fun getting
images from a USB camera. Vista automatically mounts the camera in
Computer\Canon DIGITAL IXUS i zoom\Removable storage\DCIM\100CANON
So when I use a standard TOpenPictureDialog box it allows me to see the file
quite happily as in vista explorer but when I select them and hit OK in the
Files property of the TOpenPictureDialog there is only a list of filenames
no sort of path structure. How do I then go and open/copy/move those files?
Thanks
Paul
The FileName property should include the path.
...
Eof of file , file read and file write ! Problem !Hello All,
I want to do 2 things.
I have a big file and I want to read file line by line upto last.
and side by side i want to write it to new file with some change
I am not getiing , in a read , linemode! how i will get End of file and how
i will do all this.
can you tell me script.
I'm not sure I understand your question.
From the PowerBuilder Help file, in linemode! FileRead() will return a 0
when it reaches End of File (EOF) so it should be trivial to code? This
is just off the cuff but I would imagine it's something like
li_Readfile = FileOpen( <my file to read information> )
<validate that file opened properly and return value is not null and
greater than -1>
li_WriteFile = FileOpen( <my new file to be written information> )
<validate that file opened properly and return value is not null and
greater than -1>
li_CharactersRead = FileRead( li_ReadFile, ls_Line)
ll_TotalWritten = 0
DO While li_CharactersRead > 0
li_CharactersWritten = FileWrite( liWriteFile, ls_Line)
<Validate that characters written is equal to characters read>
ll_TotalWritten = ll_TotalWritten + li_CharactersRead
li_CharactersRead = FileRead( li_ReadFile, ls_Line)
END DO
li_Return = FileClose( li_ReadFile)
<Validate close succeeded>
li_Return = FileClose( li_WriteFile)
<Validate Close succeeded>
There's an example in the online help for the examples fo...
Reading a text file in Delphi 2009Hi, I recently downloaded a free 30 day trial of delphi 2009 for my computing AS level. I am currently using the program to write simple coonsole applications. I am having trouble with a certain command Reset. This is the code that i have entered and the error occurs when it reaches Reset. We have Delphi 7 at my school and i have used it on 7 and itt works but when i try and run it on 2009 it comes up with an error message abnd a warning saying;
[DCC Warning] txtfilerandom.dpr(20): W1019 For loop control variable must be simple local variable
[DCC Error] txtfilerandom.dpr(28): E2070 Unknow...
Reading files from file server
Hi all,I need
help reading data from files . I am storing files in the file
system and unable to read the file from the file system. I am stroing
doc and PDF files in my file system. Can any one help me in
reading the files back from the file system... Here is my code
If (uploadPDF.HasFile = False Or uploadWord.HasFile = False) Then ' No file uploaded!&nbs...
Delphi control Samsung Tab3 camera over USBPlatform: DXE3 -> 32b .exe running on a Win7 laptop.
I want my 32b .exe running on the laptop to be able to take control of the camera of the Samsung Tab 3 via a USB cable. I want my users to be able to use my .exe running on the laptop to be able to see on the Win7 laptop, what the camera is seeing, and click a "Take Picture" button to take the picture, and then have that picture automatically loaded to the Win7 laptop in a designated folder.
Is there anything out there that does this? Thanks in advance for your help.
Kevin wrote:
> Is there anything out there th...
File read write on iOS using DelphiDoes anyone have sample code that shows how to read and write files on iOS device in Delphi? Or any other information on that topic? How is file i/o in iOS different on the Simulator and the actual iOS device itself? Thanks!
Almost same in windows , but r/w speed is much slower :)
{code}
//
// iOS Native Graphic Wrapper for Delphi
//
unit iOS_Files;
interface
{$mode delphi}
{$modeswitch objectivec1}
uses
SysUtils, Types, Classes, Variants, Math,
UITypes,
CFBase,CFURL,
CGContext,CGGeometry,CGColorSpace,
iPhoneAll,
NSHelpers, // By P...
how to choose and read doc or txt file in delphi projecthello, help me, i want to make choose file button in my delphi project, choose my .doc or .txt file and read it in my project.
user user1 wrote:
> hello, help me, i want to make choose file button in my delphi project, choose my .doc or .txt
> file and read it in my project.
Hi,
The following should get you started:
Drop a TButton and a TOpenDialog on a form.
Double click on the button and fill in the following in the OnClick handler of the button:
{code}
procedure TForm2.Button1Click(Sender: TObject);
var
sl: TStringList;
begin
if not OpenDialog1.Execute(Handle) ...
Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF------_=_NextPart_001_01C73F21.48FF8233
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Here is a snippet of the code:
my $MyFileHand; =20
my $MyFileHand1; =20
=20
open($MyFileHand,"<$MyFileIn") || diet (3, $MyFileIn, $!);
open($MyFileHand1,"<$MyFileIn1") || diet (3, $MyFileIn1, $!);
=20
............
=20
proc_getrcd( $MyFileHand , $MyEOFProd, $MyWorkp, $MyInp ,
$GlblInfo{compcnt}, $MyUnpackSw );
proc_getrcd( $MyFileHand1, $MyEOFTest, $MyWorkt, $MyInt ,
$GlblInf...
Is Anybody Working on a Delphi Class to Read PST Files?See http://msdn.microsoft.com/en-us/library/ff385210(v=office.12).aspx
The PST format is publicly documented now.
John Jacobson wrote:
> The PST format is publicly documented now
The joking/cynical side of me wonders what the new file format for the
*next* version of Outlook is going to be ...
--
John Kaster http://blogs.embarcadero.com/johnk
Embarcadero Developer Network: http://edn.embarcadero.com
Features and bugs: http://qc.embarcadero.com
Got source? http://cc.embarcadero.com
On 5/27/2010 10:39 AM, John Kaster wrote:
> John Jacobson wrote:
>
>> Th...
Simple read write usb hid delphi [Edit]I'm working in Delphi2010 and looking for some simple code to find a USB HID device with a known PID VID then write a few bytes (not more than 6) and read a few bytes (not more than 40) from the device on occasion and handle the simple "it's missing" kind of thing. I already have a form with places to generate the outgoing data and handle the incoming data. The device (with a PIC) already has the code to be found as well as code to get and send data, but the computer Delphi end is driving me nuts. I can f
ind all sorts of code that will make a list, and put another box on th...
Read an outlook (express or not) body of message file with DelphiHello to the Delphi gurus out there,
Any idea on how to read the text of a message from a *.msg file Ms outlook or express
we get a lot of deamon generated messages of bad addresses (I swear I do not engage in spamming) and we would like to extract the bad email to check them
hence extracting the returns save them in a directory and extract who it was sent to
I know how to do that if we convert each messages as a text file but it is a waste time
it would be very fast that straight from the original
I googled my fingers away but no results yes
any clues
Thanks
Philippe Waatel
Hi,...
Reading/Writing Really Large XML files... Delphi 2009Hello Everyone,
I was just wondering what the current preference is out there for
reading and writing really large XML files?
I used to use SAX - but it was not updated for Delphi 2009. I have
tried a few others - but I am having issues with really large files -
like over 800MB or so.
Bradley
unfortunatly you can try http://www.sourceforge.net/projects/alcinoe/
it's work weel with giga of data in SAX but i don't know if it's will run
under d2009 ...
"Bradley MacDonald" <bradsub@timeacct.com> wrote in message
news:176382@forums.codegear.com....
Component to read, display and print xlsx files in Delphi 2010 ?Dear All,
I have purchased both flexcel and axolot for Delphi 2010.
Not happy with the support from either of them.
Flexcel has not yet delivered the dll for use in Delphi 2010 for xlsx files (purchased flexcel in april).
Axolot support is extremely slow and xls spreadsheet 2 is unable to print xlsx files properly with margins and bitmaps.
Can anyone suggest a component to read an xlsx file, display it on screen and then print it to a printer and export to pdf ?
It is critical for me and require it asap.
Thanks,
Nirali Shah
I'm surprised to hear that you are disapp...
Convert TSDFDataSet to Delphi 2009 ( read Text file like dataset )Hi
I'm looking TSdfDataSet for Delphi 2009
With Delphi 2007 , work all fine , but in Delphi 2009 i see only first char in every fields
Somebody have already update this src ?
Important point of src :
unit SdfData;
//-----------------------------------------------------------------------------
{ Unit Name : SdfData Application : TSdfDataSet TFixedFormatDataSet Components
Version : 2.04
Author : Orlando Arrocha email: oarrocha@hotmail.com
Purpose : This components are designed to access directly text files as
database tabl...
'C:\INETPUB\WWWROOT\APP_DATA\ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
I have developed an app with sql server express 2005 and IIS and when I try to run it on another computer I get the following error message:
ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.Cannot open user default database. Login failed.Login failed for user 'IBM\ASPNET'.
Help would be much appreciated.
Thanks
Darren
ACLs on the folders, permissions, check to see if SQL Express is installed, etc.
JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That ...
Database 'C:\INETPUB\WWWROOT\HOURSREPORTING\APP_DATA\ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.
I have a website that runs on this computer through IIS. It was working fine until I went into it and added a textbox. Now it gives me this:
Server Error in '/' Application.
Database 'C:\INETPUB\WWWROOT\HOURSREPORTING\APP_DATA\ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Database 'C:\INETPUB\WWWROOT\HOURSREPORTING\APP_DATA\ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or files writeable, and rerun recovery.Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[SqlException (0x80131904): Database 'C:\INETPUB\WWWROOT\HOURSREPORTING\APP_DATA\ASPNETDB.MDF' cannot be upgraded because it is read-only or has read-only files. Make the database or...
reading we.config file as XML file
Hi, I need to read web.config file of another application. I think it can be done by reading config file as xml file. How can i do this? If it possible, give me some sample code. Is there any other way to read it? Thanks in advance. /Mamun
Please refer below code snippetSuppose below is ur web.config file1 <configuration>
2 <appSettings>
3 <add key="Login" value="admin"/>
4 <add key="Password" value="admin123"/>
5 </appSettings>
6 <connectionStrings>
7 <...
Problem reading some fileds in xml file
It's part of xml file i'm gathering info .....
<ThirdPartyProductInfo>
- <ThirdPartyProductDetails>
<OfferingType>Used</OfferingType>
<SellerId>A16MZ6IWWRWUP5</SellerId>
<SellerNickname />
<ExchangeId>Y11M3385853M6777809</ExchangeId>
<OfferingPrice>$169.99</OfferingPrice>
<Condition>new</Condition>
<ExchangeAvailability>Usually ships in 4-5 business days</ExchangeAvailability>
<SellerCountry>NA</SellerCountry>
<SellerState>NA&l...
File Read and File Delete. Concurrency
Keeping image files and their thumbnail image files in a directory and using a custom handler to show the miniatures (and create cache thumbnails mentioned before) I sometimes have a situation where a user downloads a file (the handler is being used) and admin wanting to delete the file in the same time. That creates a situation when file cannot be deleted due to access deny. Ideas how to let admin delete the file anyway?
Best regards,Jarosław Jaskułowski...
How to read file size of an existing file?
I was wondering if there was a way to read files byte size? I know there is System.IO namespace that interacts with the files/folders. Any help will be highly appreciated.
Thanksnimish
Hi nimish,
try this
FileInfo f = new FileInfo(@"c:\YourFileName.txt");
long fileSize = f.Length;
Note: Don't forget to include System.IO namespace
Thanks,
Best Regards,
Muhammad Akhtar SHiekhPlease remember to mark the appropriate replies as answer after your question is solved, thanks
You can check the FileInfo class to work get properties of a certain fil...
Can't read an Excel 2010 32bit file from a Delphi 64bit programHello,
I have a 64bit Delphi program that is trying to read an Excel spreadsheet using ADO. The platform is Windows 7 64bit with Office 2010 32bit installed. So I have a 64bit program trying to read Excel using 32bit drivers. I think this is the core of the problem. When I change my target platform and compile the program as 32bit, the code reads the Excel file correctly. When it fails I get the message 'Provider cannot be found. It may not be properly installed.
Here is my procedure to read the file. I appreciate any help. Thanks in advance,
Hardee Mahoney
Washington, DC
...
I'm looking TSdfDataSet for Delphi 2009 ( read Text file like dataset )Hi
I'm looking TSdfDataSet for Delphi 2009
With Delphi 2007 , work all fine , but in Delphi 2009 i see only first char in every fields
Somebody have already update this src ?
Important point of src :
unit SdfData;
//-----------------------------------------------------------------------------
{ Unit Name : SdfData Application : TSdfDataSet TFixedFormatDataSet Components
Version : 2.04
Author : Orlando Arrocha email: oarrocha@hotmail.com
Purpose : This components are designed to access directly text files as
database tabl...
How disable save file popup error message: file "could not be saved, because the source file could not be read." ; jorWhen I save web pages (complete, not merely html, in order to save
images) to my disk, while offline, I get about 10 pop up messages saying
it can't load .js & .php files. I have to close each one of those 10
windows individually - a big waste of human time.
Firefox 3.6.10 on Ubuntu Linux 10.4
Is there a way to
1) disable those info messages so they don't pop up, or
2) have ff put all the messages into merely one window, so I only have
to close one window per web page.
Thanks. :)
=
Popup window error message:
{filename path to folder on disk} "could not...