BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inserting a row into a table

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Kei
Guest





PostPosted: Sat Nov 13, 2004 2:55 pm    Post subject: Inserting a row into a table Reply with quote



I'm just starting to write database applications, and in one case I would
like to search for files on the hard drive and insert the filename data into
a table. all fields are requird (Non-null). Here is the code:

Table1.Insert;
TWideStringField(Table1.FieldByName('filename')).Value := sName;
TWideStringField(Table1.FieldByName('path')).Value := sDir;
Table1.FieldByName('size').Value := GetFileSize(sFullName);
Table1.Post;

Everytime a runtime error saying that "path" cannot be null. But I've
assigned a value to it.. what's wrong with this code?

Thanks

Kei


Back to top
Bill Todd
Guest





PostPosted: Sat Nov 13, 2004 3:20 pm    Post subject: Re: Inserting a row into a table Reply with quote



When you ask database questions you must tell us what database you are
using and which data access components you are using.

If you are using Paradox tables your problem is probably that Paradox
has no widestring support.

--
Bill (TeamB)
TeamB cannot answer questions received via email
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.