Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ArcSDE C APiµÄC#µ÷ÓÃ

Ñ¡Á½¸ö±È½ÏÓдú±íÐԵĺ¯Êý
Ê×ÏÈÏÂÔØ°²×°sdk£¬½«ÆäÖеÄsde.dll,pe.dllºÍsg.dll¿½±´¹ýÀ´
ʹÓÃÈçϵĴúÂ룬ָ¶¨dllºóÖ±½Óµ÷ÓÃÆäÖеĺ¯Êý£¬
/// <summary>
/// Sets the value for a small integer column.
/// </summary>
[DllImport(".\\sde91.dll", SetLastError = true, ThrowOnUnmappableChar = true)]
public static extern Int32 SE_stream_set_smallint(IntPtr stream, Int16 column, sbyte[] short_val);
/// <summary>
/// Sets the value for a string column.
/// </summary>
[DllImport(".\\sde91.dll", SetLastError = true, ThrowOnUnmappableChar = true)]
public static extern Int32 SE_stream_set_nstring(IntPtr stream, Int16 column, byte[] string_val);
 
ÔÚ²åÈëÊý¾ÝʱʹÓõ½µÄÁ½¸öº¯Êý£¬Ò»¸öÊDzåÈëstring£¬ÁíÒ»¸öÊDzåÈësmallint£¨shortÐÍ£©
ÔÚc#ÖУ¬stringÊÇunicodeµÄ£¬ËùÒÔÐèҪʹÓú¯ÊýSE_stream_set_nstring
´Ëº¯ÊýµÄµÚÈý¸ö²ÎÊýÈçÒÔÉÏ´úÂëÖеģ¬Èç¹ûÖ±½ÓдΪstring£¬Ôò¶ÔÓÚÖÐÎÄ×Ö·û£¬³öÀ´µÄ¾ÍÊÇÂÒÂëÁË
ʹÓÃbyte£¬È»ºóµ÷ÓÃʱÈçÏ£º
ret = Stream.SE_stream_set_nstring(insertStream, 3, (new UnicodeEncoding()).GetBytes("²âÊÔ"));
 
¶ÔÓÚsmallintÐÍ£¬ÔÚSE_stream_set_smallintº¯ÊýÖÐÖ±½ÓʹÓÃshort£¬
Ò²³öÏÖ´íÎ󣬲»ÖªµÀΪʲô£¬ºóÀ´Ïëµ½
C#ÖеÄsbyteÊÇ8λµÄ£¬Á½¸ö×é³ÉµÄÊý×é¾ÍÊÇÒ»¸öshort(16λÓзûºÅÕûÐÍ)
È»ºóÊÔÁËÊÔ£¬¹ûÈ»¿ÉÓã¬
ʹÓõÄʱºò×¢Ò⣬±ÈÈçÒª´æÈëÒ»¸ö±äÁ¿ashort;
sbyte[0]ÖеÄÊýÖµ£¬¿ÉÒÔΪСÓÚ256µÄÖµ
µ±ÊýÖµ´óÓÚ256ʱ(1<<8)
sbyte[1]¾ÍÊÇÊýÖµashort>>8;
sbyte[0]Ϊashor-((ashort>>8)<<8)
ʹÓÃλÔËË㣬¼òµ¥·½±ãЧÂʸߣ¬²»ÖªµÀ»¹ÓÐûÓÐÆäËû²»ÐèҪת»»µÄ·½·¨


Ïà¹ØÎĵµ£º

cÊäÈëÊä³ö


¸ñʽÊä³ö:
printf(¸ñʽ¿ØÖÆ, Êä³ö±íÁÐ);
%d Ê®½øÖÆÊý  %md mΪָ¶¨µÄ¿í¶È ÈôÊý¾ÝλÊýСÓÚm,Ôò×ó¶Ë²¹ÒÔ¿Õ¸ñ;Èô´óÓÚm,Ôò°´Êµ¼ÊλÊýÊä³ö
%ld ³¤ÕûÐÍÊý¾Ý  %mld Ö¸¶¨×ֶοí¶È
%o °Ë½øÖÆÕûÊýÐÎʽ  %mo
%x Ê®Áù½øÖÆÕûÊýÐÎʽ  %mx
%u unsignedÐÍÊý¾Ý,ËüÒ²¿ÉÓÃ%o»ò%x¸ñʽÊä³ö
%c Ò»¸ö×Ö·û   ......

C/C++µ¥Ôª²âÀíÂÛ¾«Òª£¨Ê®Ò»£©

µÚ4Õ ÔõÑù²ÅÄܱ£Ö¤²âÊÔЧ¹û£¿
4.1 ºâÁ¿²âÊÔЧ¹ûµÄ»ù±¾Ö¸±ê£º°×ºÐ¸²¸Ç
    ºâÁ¿²âÊÔЧ¹ûµÄ»ù±¾Ö¸±êÊǰ׺и²¸ÇÂÊ£¬¼´Í³¼Æ²âÊÔ¶Ô´úÂëÂß¼­µ¥Î»µÄ¸²¸Ç×´¿ö¡£´úÂëµÄÂß¼­µ¥Î»Ö÷ÒªÓУºÓï¾ä(¿é)£¬Ìõ¼þ¡¢Åж¨¡¢·ÖÖ§¡¢Â·¾¶¡£³£Óõİ׺и²¸ÇÓÐÁùÖÖ£ºÓï¾ä¸²¸Ç¡¢Ìõ¼þ¸²¸Ç¡¢·ÖÖ§¸²¸Ç¡¢Åж¨Ìõ¼þ¸²¸Ç¡¢ÐÞÕýÅж¨Ìõ¼þ¸²¸Ç¡¢º ......

C# Á¬½ÓMySqlµÄ·½·¨


1.´Óhttp://prdownloads.sourceforge.net/mysqldrivercs/MySQLDriverCS-n-EasyQueryTools-3.0.18.exe?downloadÉÏÏÂÔØMySQLDriverCS. 
2.°ÑMySQLDriverCS.dll.Ìí¼Óµ½.netµÄ×é¼þ 
3.ʹÓ÷½·¨ 
 ÏÂÃæÊÇ´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó:
ÏÂÃæÊÇ´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó:
using MySQLDriverCS;
MySQLConnection conn ......

C# C/SģʽÏÂʵÏÖÈí¼þ×Ô¶¯ÔÚÏßÉý¼¶

1 Ç°ÑÔ 
¡¡³¤ÆÚÒÔÀ´£¬¹ã´ó³ÌÐòԱΪµ½µ×ÊÇʹÓÃClient/Server£¬»¹ÊÇʹÓÃBrowser/Server½á¹¹ÕùÂÛ²»ÐÝ£¬ÔÚÕâЩÕùÂÛµ±ÖÐ,C/S½á¹¹µÄ³ÌÐò¿Éά»¤ÐԲ²¼ÖÃÀ§ÄÑ£¬Éý¼¶²»·½±ã£¬Î¬»¤³É±¾¸ß¾ÍÊÇÒ»¸öÏàµ±ÖØÒªµÄÒòËØ¡£ÓкܶàÆóÒµÓû§¾ÍÊÇÒòΪÕâ¸öÔ­Òò¶ø·ÅÆúʹÓÃC/S¡£È»¶øµ±Ò»¸öÓ¦ÓñØÐëҪʹÓÃC/S½á¹¹²ÅÄܺܺõÄʵÏ֯书ÄܵÄʱ ......

LINUX C ʱ¼ä²Ù×÷

  1.ʱ¼ä±íʾ
    ÔÚ³ÌÐòµ±ÖÐ,ÎÒÃǾ­³£ÒªÊä³öϵͳµ±Ç°µÄʱ¼ä,±ÈÈçÎÒÃÇʹÓÃdateÃüÁîµÄÊä³ö½á¹û.Õâ¸öʱºòÎÒÃÇ¿ÉÒÔʹÓÃÏÂÃæÁ½¸öº¯Êý:
#include <sys/time.h>
time_t time(time_t *tloc);
char *ctime(const time_t *clock);
    timeº¯Êý·µ»Ø´Ó1970Äê1ÔÂ1ÈÕ0 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ