邮编分拣一般用于邮件的初次分拣,即按照邮编的前四位确定邮件到达的省市县,具体到达用户的手里,仍然需要邮件到达地的内部分拣人员和投递人员来人工识别,因为当地的内部分拣人员对本地的地址非常熟悉,对错分或地址不详的邮件将按规定转发或退回。所以,填写邮编的时候,务必确保前面四位准确。
你的意思不是很明朗,你加载ADODC1 对应 数据库1,ADODC2 对应 数据库2,加载一个按钮,程序如下:
Private Sub Command3_Click()
Adodc1.Recordset.MoveFirst
Do Until Adodc1.Recordset.EOF
Adodc2.RecordSource = "select * from 数据库2 where 镇 = '"&Adodc1.Recordset.Fields("镇") &"'"
Adodc2.Refresh
Adodc1.Recordset.Fields("邮编") = Adodc2.Recordset.Fields("邮编")
Adodc1.Recordset.Update
Adodc1.Recordset.MoveNext
Loop
End Sub
简单通讯录管理程序,代码如下:#include<stdio.h>
#include
<string.h>
#include
<stdlib.h>
typedef
struct
student
*ST
struct
student
{
char
stN[20]
char
stVal[128]
char
stNo[10]
char
stTel[12]
ST
next
}
ST
head
=
NULL
int
ShowNode()
{
char
no[20]
=
{0}
ST
t
printf("输入姓名:")
scanf("%s",
no)
for
(t
=
head
t
t
=
t->next)
{
if
(!memcmp(t->stN,
no,
strlen(no)))
{
printf("姓名:%s,
地址:%s
邮编:%s
电话:%s\n",
t->stN,
t->stVal,
t->stNo,
t->stTel)
return
0
}
}
printf("无此人信息\n")
return
0
}
int
ChangeNode()
{
char
no[20]
ST
t
printf("输入姓名:")
scanf("%s",
no)
for
(t
=
head
t
t
=
t->next)
{
if
(!memcmp(t->stN,
no,
strlen(no)))
{
printf("输入新的记录:\n")
printf("地址:")
scanf("%s",
t->stVal)
printf("邮编:")
scanf("%s",
t->stNo)
printf("英语成绩:")
scanf("%s",
t->stTel)
return
0
}
}
printf("无此人信息\n")
return
0
}
int
InsertNode()
{
ST
t
t
=
(ST)malloc(sizeof
*t)
printf("输入姓名:")
scanf("%s",
t->stN)
printf("输入地址:")
scanf("%s",
t->stVal)
printf("输入邮编:")
scanf("%s",
t->stNo)
printf("输入电话:")
scanf("%s",
t->stTel)
t->next
=
head
head
=
t
return
0
}
int
DelNode()
{
ST
x,
y
char
no[20]
=
{0}
printf("输入姓名:")
scanf("%s",
no)
for
(x
=
y
=
head
x
y
=
x,
x
=
x->next)
{
if
(!memcmp(x->stN,
no,
strlen(no)))
{
if
(x
==y)
{
x
=
head
=
head->next
y->next
=
NULL
free(y)
return
0
}
else
{
y->next
=
x->next
x->next
=
NULL
free(x)
return
0
}
}
}
printf("无此学生\n")
return
0
}
int
main(void)
{
int
i
while(1)
{
printf("查询记录:1\n"
"更改记录:2\n"
"插入记录:3\n"
"删除记录:4\n"
"退出:5\n")
scanf("%d",
&i)
if
(1==i)
{
ShowNode()
}
else
if(2==i)
{
ChangeNode()
}
else
if(3==i)
{
InsertNode()
}
else
if(4==i)
{
DelNode()
}
else
if(5==i)
{
break
}
else
{
printf("输入错误!请重新输入!\n")
continue
}
}
return
0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)