Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Database
Message
De
20/04/2004 07:08:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00895908
Message ID:
00896413
Vues:
21
>Hi Cetin,
>Thank you very much for your help. I try to understand my problem. It looks like it is not possible to use '\\Server\' as address when you try to create the database file. It must be on the form 'C:\' or any other letter if that is available on your server. However, with your help I now succeeded to create the database on our SQL-server. I also added the following to your code for specifying the logfile.
>Text to m.lcCreateDB textmerge noshow
>Create Database <>
> ON PRIMARY (NAME = <>_Data,
> FILENAME = '<><>_Data.mdf',
> SIZE=5MB,MAXSIZE=100MB,FILEGROWTH=10%)
> LOG ON (NAME = <>_Log,
> FILENAME = '<><>_Data.ldf',
> SIZE=1MB,MAXSIZE=10MB,FILEGROWTH=10%)
>ENDTEXT
>
>A last question, which maybe is on a very simple level but for me not, how shall interprete < < in your code. This is new for me.
>Best regards
>Anders

Those are default textmerge delimiters. When foxpro does a textmerging it interprets any text as plain text as if you wrote exactly as is. When it engounters the delimiters replaces text in delimiters with the expression result. ie:
myBDate = {^1961/1/1}
text to m.lcTest TEXTMERGE noshow
Today is <<transform(date(),'@YL'>>.
Now I'm <<year(date())-year(m.myBDate)>> years old.
This is ASCII value of A :<<asc('A')>>
endtext
Note that though the expression results are of different types textmerging takes care of it and easier then using string concatanation, ? etc.
Also there is another (actually more than one) textmerge :
use employee

set textmerge to memvar m.lcHTML noshow
set textmerge on
\\<HTML><BODY><TABLE border="1">
\<TR><TH>First Name</TH><TH>Last Name</TH></TR>
scan
  \<TR><TD><<First_Name>></TD><TD><<Last_Name>></TD></TR>
endscan
\</TABLE></BODY></HTML>
set textmerge to
set textmerge off

StrToFile(m.lcHTML, "c:\CheckMe.htm")
\ and \\ stand for ? and ?? for textmerge. Only those lines would be written to destination. IOW for scan..endscan part it's something like :
...
scan
  m.lcHTML = m.lcHTML + chr(13) +;
  "<TR><TD>"+First_Name+"</TD><TD>"+Last_Name+"</TD></TR>"
endscan
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform