首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴wp231957的代码贴全部
#include <stdio.h>
#import "c:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename ( "EOF", "adoEOF" ) 

int main(void)
{
 
    return 0;
}
阅读全部 | 2012年12月12日 14:06
http://www.programfan.com/club/showpost.asp?id=16707
阅读全部 | 2012年12月12日 10:44
http://msdn.microsoft.com/en-us/library/ms710252.aspx
阅读全部 | 2012年12月12日 10:44
现在大部分C#连接数据库都会是sql server 。但对一些旧的数据库文件的连接和操作就不太熟了。
      今天就有这个问题,要对FOXPRO生成的DBF文件数据库进行操作。
      我在CSDN上查了很久,大部分有问题都没很好地回复到这些操作上的问题。
      经过我的实验,用ODBC来连接它就可以了。
      下面是所用的代码。
      都很简单,就是格式上要注意。和用开的查询语句会有很大不同。
protected void Page_Load(object sender, EventArgs e)
    {
        System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection();
        string table = @"D:\aaa\code.dbf";
        string connStr=@"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=" + table + ";Exclusive=No;NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO";

......................
阅读全部 | 2012年12月12日 10:26
#include<stdio.h>
#include<string.h>

int main()
{
    int i;
    char tmp[3]={'\0'};
    char* test="abcdefghijklmnopqrstuvwxyz";
    for(i=0;i<(int)strlen(test);i++)
    {
        tmp[1]=((test[i])%(0x60))%10+0x30;
        tmp[0]=(test[i]%0x60)/10+0x30;
......................
阅读全部 | 2012年12月8日 19:11
#include<stdio.h>

int main()
{
    int rui[12]={31,29,31,30,31,30,31,31,30,31,30,31};
    int ping[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    int ruiflag=0;
    int day,month,year,sum=0;
    printf("\nplease input year,month,day\n");
    scanf("%d,%d,%d",&year,&month,&day);
    if((year%4==0 &&year%100!=0) || year%400==0) ruiflag=1;
    for(int index=0;index<month-1;index++)
......................
阅读全部 | 2012年12月8日 18:30
#include <stdio.h>
#include <malloc.h>
#include <string.h>

#define  max 128    //定义存储字符串的最大长度
#define  num 500   //定义求Fibonacci数列个数

void char_add(char* a,char* b,char* c)
{
    int ia[max]={0};
    int ib[max]={0};
    int ic[max]={0};
......................
阅读全部 | 2012年12月6日 16:29
void char_add(char* a,char* b,char* c)
{
    int ia[max]={0};
    int ib[max]={0};
    int ic[max]={0};
    int flag=0;
    int i,tmp,tmp2;
    for(i=0;i<max;i++)
    {
        if(a[i]=='\0') ia[i]='0'; else ia[i]=a[i]-'0';
        if(b[i]=='\0') ib[i]='0'; else ib[i]=b[i]-'0';
    }
......................
阅读全部 | 2012年12月5日 11:09
#include "stdio.h"
#include "time.h"
_int64 fun(_int64 n)
{
    _int64 s;
    if(n==0||n==1) return 1;
    s=(fun(n-1)+fun(n-2));
    return s;
}
int main()
{
    clock_t start,finish;
......................
阅读全部 | 2012年12月4日 16:14
上一页 6 7 8 9 10 11 12 13 14 15
wp231957