佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

楼主: maybird_2

Visual FoxPro 的疑难杂症

[复制链接]
发表于 26-1-2005 10:52 PM | 显示全部楼层
如果是create cursor的话...
这样应该可以

SELECT tempA
SCAN
SCATTER TO tmpArray
SELECT tempB
APPEND FROM ARRAY tmpArray
SELECT tempA
ENDSCAN

[ Last edited by astral on 26-1-2005 at 10:59 PM ]
回复

使用道具 举报


ADVERTISEMENT

发表于 26-1-2005 10:59 PM | 显示全部楼层
tstan135 于 26-1-2005 22:01  说 :
要是 create 两个 cursor - TempA 和 TempB。
请问要如何可以让 cursor TempA 的 record copy 到 cursor TempB?
我用:
  1. select TempB
  2. append from TemA
复制代码

就有 error。(TempA.dbf dose not  ...


对 的确有些问题........我用 VFP8 ,虽然 没有以上的error
不过会自动add 多3百多笔空的record........

所以 用astral 的方法试试看
回复

使用道具 举报

发表于 27-1-2005 10:49 AM | 显示全部楼层
  
SELECT tempA
SCAN
SCATTER TO tmpArray
SELECT tempB
APPEND FROM ARRAY tmpArray
SELECT tempA
ENDSCAN


astral 的方法果然可以。
回复

使用道具 举报

发表于 27-1-2005 03:11 PM | 显示全部楼层

foxpro

请问dos 版的 foxpro (foxpro ver2.6) 的 data 可以convert 去新版的windows base foxpro
or other type "database programming" 吗?

如果能
  什么 program?
  怎样convert?
回复

使用道具 举报

发表于 27-1-2005 03:36 PM | 显示全部楼层
应该可以直接在VFP里使用...
回复

使用道具 举报

发表于 29-1-2005 03:07 AM | 显示全部楼层
enry98 于 26-1-2005 10:59 PM  说 :

对 的确有些问题........我用 VFP8 ,虽然 没有以上的error
不过会自动add 多3百多笔空的record........

所以 用astral 的方法试试看

我也是用 VFP8,但就是有 error。
回复

使用道具 举报

Follow Us
发表于 29-1-2005 03:26 AM | 显示全部楼层
1.请问在 multiuser environments 里, 你们的 program 可以让多位 user 同时使用吗?如果同时 key in 会不会有问题?

2.请问在 multiuser environments 里,你们是不是在 user 的电脑把主机的 database folder 变成 local drive (map network drive)。

3.请问 set as main 的 code.prg 应该怎样写?可以 show example?因为我还是用 menu 来 set as main。
回复

使用道具 举报

发表于 29-1-2005 09:20 AM | 显示全部楼层
tstan135 于 29-1-2005 03:26 AM  说 :
1.请问在 multiuser environments 里, 你们的 program 可以让多位 user 同时使用吗?如果同时 key in 会不会有问题?

肯定可以让多位使用者同时 key-in,

Add record 最好方法 one form one record,
scatter to array
all the edit field Thisform.Text??.ControlSource is above array
做个 Save 的按键。
append from array

用 Grid 物件也可以,但得避免同一 record 同时 edit。

2.请问在 multiuser environments 里,你们是不是在 user 的电脑把主机的 database folder 变成 local drive (map network drive)。

也可以啦!

为了防范开机时没有 logon 所造成 map 的硬盘断了联系,我的做法用它的 full path
\\Server\F\Program files\My System\

3.请问 set as main 的 code.prg 应该怎样写?可以 show example?因为我还是用 menu 来 set as main。

迟点参观/阅读我的教程。
回复

使用道具 举报


ADVERTISEMENT

发表于 31-1-2005 03:20 PM | 显示全部楼层
请问 Encrypt 和 Decrypt 的 function 应该怎样写?
回复

使用道具 举报

发表于 1-2-2005 02:24 PM | 显示全部楼层
tstan135 于 31-1-2005 03:20 PM  说 :
请问 Encrypt 和 Decrypt 的 function 应该怎样写?

Encryption 有很多种,其一是字母对换表 Cipher encryption

A 换成 C
B <-> D
C <-> E
1 <-> 3
2 <-> 4
3 <-> 5

以上是 ASCII 字元加 2
假如你的字串是 tstan135 ,
Encrypt 之后就变成 vuvcp357,
Decrypt 就还原。

你尝试做出这函数。
回复

使用道具 举报

发表于 1-2-2005 03:06 PM | 显示全部楼层
如果 database 已经 corrupted 了,请问要如何 repair?
回复

使用道具 举报

发表于 2-2-2005 08:55 AM | 显示全部楼层
tstan135 于 1-2-2005 03:06 PM  说 :
如果 database 已经 corrupted 了,请问要如何 repair?

是 table *.dbf 或者 container *.dbc ?
回复

使用道具 举报

发表于 2-2-2005 09:13 AM | 显示全部楼层
是 table *.dbf
回复

使用道具 举报

发表于 2-2-2005 09:23 AM | 显示全部楼层
有备份吗?
假如答案否,请多多保重。
回复

使用道具 举报

发表于 2-2-2005 11:05 AM | 显示全部楼层
1.请问您是如何做备份?
2.请问为什么 *.dbf 这样容易 corrupted?
回复

使用道具 举报

发表于 2-2-2005 11:46 AM | 显示全部楼层
tstan135 于 1-2-2005 03:06 PM  说 :
如果 database 已经 corrupted 了,请问要如何 repair?


你可以try
   open database xxx
   validate database recovery

如是.dbf Table coruptted,try
   set tablevalidate to 0
   use ttt excl
   pack
   reindex

我是用VFP8的

good luck
回复

使用道具 举报


ADVERTISEMENT

发表于 2-2-2005 01:27 PM | 显示全部楼层
tstan135 于 2-2-2005 11:05 AM  说 :
1.请问您是如何做备份?

use A1
copy to A1.xxx
use B2
copy to B2.xxx


2.请问为什么 *.dbf 这样容易 corrupted?

很多原因的,

假如是电流中断造成 .dbf file truncated 有一半没后半段,那就很难 recover。
如果只是 index file corrupt 则 reindex 就可以补救得到。

补救方法:买个 UPS - Uninterruptable Power Supply

假如是 HDD (硬盘) bad sector 刚好正中 .dbf,这个 HDD 快要进垃圾筒。

补救方法:换一个新硬盘,把所有的资料搬过去新的。
回复

使用道具 举报

发表于 2-2-2005 03:53 PM | 显示全部楼层
我是在 program exit 时,自动把 *.dbf  和 *.cdx copy 到 另一个 folder 里。
但这样也会把 corrupted 的 *.dbf copy 起来,这样的 backup 也没有用。
回复

使用道具 举报

发表于 3-2-2005 03:22 PM | 显示全部楼层
请问在 create cursor 里,如何 set index or set order?
回复

使用道具 举报

发表于 3-2-2005 04:32 PM | 显示全部楼层
tstan135 于 3-2-2005 03:22 PM  说 :
请问在 create cursor 里,如何 set index or set order?

eg:
create cursor tmp(uid c(10), code c(10), desc c(100))
index on uid tag byID
...
set order to byID
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 6-12-2025 07:00 AM , Processed in 0.143227 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表