读SQLite读不到数据 [问题点数:40分,结帖人ericllzh]

Bbs3
本版专家分:775
结帖率 97.32%
Bbs1
本版专家分:90
串口不到数据
用API编写的程序,为什么串口<em>读</em><em>不到</em><em>数据</em>rnBOOL CCSerialApp::OnStart() rnrn // TODO: Add your command handler code herern DCB dcb;rn //打开串口,得到串口句柄rn hCOM=CreateFile("COM1",GENERIC_READ|GENERIC_WRITE,rn 0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED,NULL);rn if(hCOM==INVALID_HANDLE_VALUE)rn return false;rnrn //初始化串口,READBUFFER,WRITEBUFFER是用户自己定义的rn SetupComm(hCOM,1024,1024);rn PurgeComm(hCOM,PURGE_TXCLEAR|PURGE_RXCLEAR);rnrn //设置DCB参数rn if(!GetCommState(hCOM,&dcb))rn rn CloseHandle(hCOM);rn return false;rn rn dcb.BaudRate=9600;rn dcb.ByteSize=8;rn dcb.Parity=NOPARITY;rn dcb.StopBits=ONESTOPBIT;rn if(!SetCommState(hCOM,&dcb))rn rn CloseHandle(hCOM);rn return false;rn rn //设置超时值rn COMMTIMEOUTS to;rn to.ReadIntervalTimeout=MAXDWORD;rn to.ReadTotalTimeoutConstant=0;rn to.ReadTotalTimeoutMultiplier=0;rn to.WriteTotalTimeoutConstant=0;rn to.WriteTotalTimeoutMultiplier=0;rn if(!SetCommTimeouts(hCOM,&to))rn rn CloseHandle(hCOM);rn return false;rn rn //初始化OVERLAPPEDrn memset(&overlapped,0,sizeof(OVERLAPPED));rn overlapped.hEvent=CreateEvent(NULL,TRUE,FALSE,NULL);rn if(overlapped.hEvent==NULL)rn rn AfxMessageBox("WRONG");rn return false;rn rnrn //用事件驱动方式需设置事件代码rn if(!SetCommMask(hCOM,EV_RXCHAR))rn rn CloseHandle(hCOM);rn return false;rn rn total=0;rn Receive();rnrnvoid CCSerialApp::Receive()rnrn DWORD dwEvent,dwError;rn DWORD nRealRead,i,dwLength;rn char seq[100];rn int begin;rn int j;rn dwEvent=dwError=0; rn if(WaitCommEvent(hCOM,&dwEvent,&overlapped))rn rn rn ClearCommError(hCOM,&dwError,&comstat);rn dwLength=comstat.cbInQue;rn if((dwEvent&&EV_RXCHAR)&&dwLength)rn rn LPBYTE inBuffer=new BYTE[dwLength];rn BOOL fReadStat=ReadFile(hCOM,inBuffer,dwLength,rn &nRealRead,&overlapped);rn if(!fReadStat)rn rn dwError=GetLastError();rn if(dwError==ERROR_IO_PENDING)rn rn GetOverlappedResult(hCOM,&overlapped,&nRealRead,TRUE);rn overlapped.Offset=0;rn rn rn elsern dwLength=0;rn rn elsern rn for(i=0;i
Request.ClientCertificate 不到数据
我在本地的IE里查看了 有证书,但是为什么代码里获取<em>不到</em>值呢rnrn谢谢
串口ReadFile不到数据
下位机用的是FT232芯片,所以我从FTDI官网找了代码直接下载来用的(http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/VC.htm)Example 5.rn代码中我只将波特率改成了8000000,跟我的下位机匹配,其他的代码没有改动,运行的时候运行到if(ReadFile(hCommPort, buf, w_data_len, &dwRead, NULL))这句代码就直接跳出了,不知道为什么?帮忙看看是什么原因?rn我把代码贴出来:rn[code=c]#include "stdafx.h"rn#include rn#include rn#include "ftd2xx.h"rnrnint main(int argc, char* argv[])rnrn FT_HANDLE fthandle;rn FT_STATUS res;rn LONG COMPORT;rnrn char COMx[5];rn int n;rnrn DCB dcb;rn HANDLE hCommPort;rn BOOL fSuccess; rnrnrn/***********************************************************************rn//Find the com port that has been assigned to your device.rn/***********************************************************************/rn rn res = FT_Open(0, &fthandle);rnrn if(res != FT_OK)rn rn printf("opening failed! with error %d\n", res);rn rn return 1;rn rnrn rn res = FT_GetComPortNumber(fthandle,&COMPORT);rnrn if(res != FT_OK)rn rn printf("get com port failed %d\n", res);rn rn return 1;rn rnrn if (COMPORT == -1)rnrn printf("no com port installed \n");rn rnrn elsern printf("com port number is %d\n", COMPORT);rnrn rnrnrn FT_Close(fthandle);rn rnrn/********************************************************/rn// Open the com port assigned to your devicern/********************************************************/ rnrn n = sprintf_s(COMx, "COM%d",COMPORT);rnrn hCommPort = CreateFile(rn COMx,rn GENERIC_READ | GENERIC_WRITE,rn 0,rn NULL,rn OPEN_EXISTING,rn FILE_ATTRIBUTE_NORMAL,rn NULLrn );rnrn if (hCommPort == INVALID_HANDLE_VALUE) rn rn rn printf("Help - failed to open\n");rn return(1);rnrn rn rnrn printf("Hello World!\n");rn rn/********************************************************/rn// Configure the UART interface parametersrn/********************************************************/rnrn fSuccess = GetCommState(hCommPort, &dcb);rnrnrn if (!fSuccess) rnrn rn printf("GetCommStateFailed \n", GetLastError());rn return (2);rnrn rnrn //set parameters.rnrn dcb.BaudRate = 8000000;rn dcb.ByteSize = 8;rn dcb.Parity = NOPARITY;rn dcb.StopBits = ONESTOPBIT;rn rn fSuccess = SetCommState(hCommPort, &dcb);rnrnrn if (!fSuccess) rnrn rn printf("SetCommStateFailed \n", GetLastError());rn return (3);rnrn rnrnrn printf("Port configured \n");rnrnrn/********************************************************/rn// Writing data to the USB to UART converterrn/********************************************************/rnrn DWORD dwwritten = 0, dwErr;rn char data_out[12] = "HELLO WORLD";rn DWORD w_data_len = 12;rn rnrnfSuccess = WriteFile(hCommPort, &data_out, w_data_len, &dwwritten, NULL);rn rn rn if (!fSuccess) rnrn rn dwErr = GetLastError();rn printf("Write Failed \n", GetLastError());rn return (4);rnrn rnrn rn printf("bytes written = %d\n", dwwritten);rn rn/********************************************************/rn//Reading data from the USB to UART converterrn/********************************************************/rn rn char buf[256];rn DWORD dwRead;rnrnrn memset(buf,0,256);rnrn if (ReadFile(hCommPort, buf, w_data_len, &dwRead, NULL))rn rn printf("data read = %s\n", buf);rn rnrnrn/********************************************************/rn//Closing the device at the end of the programrn/********************************************************/rnrnrn CloseHandle(hCommPort);rnrn getchar();rn return 0;rnrn[/code]rn运行结果如下:rncom port number is 3rnHello World!rnPort configuredrnbytes weittrn:12
Extjs4 Store不到数据
在使用Extjs4的Store<em>读</em>取<em>数据</em>的时候,死活<em>读</em><em>不到</em><em>数据</em>,请各位高手帮忙看看rn[code=JScript]rn rn[/code]rnrntest.json文件如下rnrows:[name:"symjie",age:23,name:"singleboy",age:45]rn使用的是php服务器,使用firebug测试了一下,可以得到<em>数据</em>,Store.data.items里面是有值的rn但是store.getCount()却得到是0,并且rn[code=JScript]store.each(function(record)rn alert(record.get("name"));rn);[/code]rn<em>读</em>不出<em>数据</em>。很是怪异!rn注意:我已经设置autoLoad:true了!
fread不到文件数据
[code=c]#ifndef _EMSTRUCT_H_rn#define _EMSTRUCT_H_rnstruct clerkrnrn char num[20]; //工号rn char name[20]; //姓名rn int iYear; //发放年份rn int iMonth; //发放月份rn float Post_salary;//岗位工资rn float Class_salary; //课时工资rn float performance_salary;//绩效工资rn double total;//合计rn;rn#endif[/code]rn这个是头文件rn下面是录入<em>数据</em>:rn[code=c]#include "stdio.h"rn#include "EMstruct.h"rn#include "stdlib.h"rn#include "string.h"rnrn#define LEN 1024 //宏定义rnrn/************************************/rnvoid menu() ;rnvoid studychoose();rn/***********************************/rnrn//全局声明rn/************************************/rnint input_n;//需要录入的职工人数rnstruct clerk stu[LEN];rn/************************************/rnrn/*录入<em>数据</em>*/rnstruct clerk* screate()rnrnrnrn int cout_cr;//循环计次用rnrn printf("需要录入的职工人数:");rn scanf("%d",&input_n);rn for(cout_cr=0;cout_cr
kafka的consumer不到数据
rt,在同一台电脑上,produce一些消息到kafka里,可看到kafka收到了消息。但在用一个consumer demo<em>读</em>取消息时,却<em>读</em>不出。可以看到consumer的offset是0,但就是取不出消息。rndemo:[url=https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example][/url]rn求解决方法!
串口不到数据
串口<em>读</em><em>不到</em><em>数据</em>,为什么?请各位高人指点rnvoid CRS485CommDlg::OnReceive() rnrn OVERLAPPED m_osRead;rn memset(&m_osRead,0,sizeof(OVERLAPPED));rn m_osRead.hEvent=CreateEvent(NULL,TRUE,FALSE,NULL);rnrn COMSTAT ComStat;rn DWORD dwErrorFlags;rn rn char str[100];rn memset(str,''\0'',100);rn DWORD dwBytesRead=100;//<em>读</em>取的字节数rn BOOL bReadStat;rnrn ClearCommError(hCom,&dwErrorFlags,&ComStat);rn dwBytesRead = min(dwBytesRead, (DWORD)ComStat.cbInQue);rn bReadStat = ReadFile(hCom,str,dwBytesRead,&dwBytesRead,&m_osRead);rn if(!bReadStat)rn rn if(GetLastError()==ERROR_IO_PENDING)rn rn WaitForSingleObject(m_osRead.hEvent, 2000);rn rn rn PurgeComm(hCom, PURGE_TXABORT|PURGE_RXABORT|PURGE_TXCLEAR|PURGE_RXCLEAR);rn m_disp = str;rn UpdateData(FALSE);rnrn
CFile Read不到数据
[code=c]rnvoid CMR_clientDlg::OnBnClickedFile()rnrn CFileDialog dlg(TRUE);rn CFile file;rn CString file_path = "";rn CString file_name = "";rn ULONGLONG file_size = 0;rn ULONGLONG endp = 0;rn ULONGLONG total = 0;rn UINT ret = 0;rn int length = 0;rn char info[1024] = 0;rn char date[64 * 1024] = 0;rn CString message = "";rn if(dlg.DoModal() != TRUE)rn rn return ;rn rn file_path = dlg.GetPathName();rn file_name = dlg.GetFileName();rn if(file.Open(file_path, CFile::modeRead) == FALSE)rn rn AfxMessageBox(_T("打开文件失败!"));rn return ;rn rn file_size = file.GetLength();rn sprintf(info, "%llu%s", file_size, file_name.GetBuffer());rn length = strlen(info);rn info[length] = 'F';rn info[length+1] = 'I';rn info[length+2] = 'L';rn info[length+3] = 'E';rn length = strlen(info);rn endp = file.SeekToEnd();rnrn while(file.GetPosition() SetWindowTextA(info);rn rnrn[/code]
MEMORYSTREAM问题,不到数据
做一个文件修复函数,从文件名,查找字符,比对,再替换字符。rnrn但是在ARRAY OF CHAR遇到问题,如果手动设置数组,READBUFFER可以<em>读</em>到<em>数据</em>,替换也正常。rnrn现在用动态数组做动态列表修复,但是SetLength(CmpStr,RepairStrLen)后,SIZEOF(CmpStr)值永远为4,而且<em>读</em>取<em>不到</em><em>数据</em>。rnrn全部家当送上rn[code=Delphi(Pascal)]rnfunction TMainFrm.RepairStr(sFileName:String;FindStr:string;RepairStr:String;RepairStrLen:integer):Boolean;rnvarrn TmpMemoryStream : TMemoryStream;rn CmpStr : array of Char;rn CmpStr1 : array of Char;rn FileSize,iAddress : Integer;rn bWrite : Boolean;rn s : String;rn I : Integer;rnbeginrn bWrite := False;rn Result := False;rn tryrn TmpMemoryStream := TMemoryStream.Create;rn tryrn TmpMemoryStream.Clear;rn TmpMemoryStream.LoadFromFile(sFileName);rn FileSize := TmpMemoryStream.Size;rn TmpMemoryStream.Position:=TmpMemoryStream.Size;rn TmpMemoryStream.Position:=0;rn SetLength(CmpStr,RepairStrLen);rn SetLength(CmpStr1,RepairStrLen);rn SetLength(s,FileSize);rn CopyMemory(@s[1],TmpMemoryStream.Memory,TmpMemoryStream.size);rn iAddress := Pos(FindStr,s) - 1;rn TmpMemoryStream.Seek(iAddress,0);rn TmpMemoryStream.ReadBuffer(CmpStr, SizeOf(CmpStr));rn TmpMemoryStream.Seek(iAddress,0);rn TmpMemoryStream.ReadBuffer(CmpStr1, SizeOf(CmpStr1));rn TmpMemoryStream.Seek(iAddress,0);rn For I := 0 to RepairStrLen dorn beginrn if CmpStr[I] <> RepairStr[I+1] thenrn CmpStr[I] := RepairStr[I+1];rn end;rn if string(CmpStr) <> string(CmpStr1) thenrn beginrn TmpMemoryStream.WriteBuffer(CmpStr, SizeOf(CmpStr));rn bWrite := True;rn end;rn Finallyrn Result := True;rn if bWrite = True thenrn TmpMemoryStream.SaveToFile(sFileName);rn TmpMemoryStream.Free;rn end;rn exceptrn TmpMemoryStream.Free;rn Result := False;rn exit;rn end;rnend;[/code]
串口通讯 突然不到数据
情况如此:rn程序运行着,突然间(周期不定)上位机接收到的下位机回复信息为乱码,之后就收到空信息。此时重启上位机程序是无效的,必须重新启动上位机或者下位机。rnrn前提:rn上位机程序采用C#rn下位机为欧姆龙PLCrnrn提前解答:rn不存在关闭上位机程序时进程未退出导致再次启动程序时端口被占用rn无任何错误被捕捉。既突然间遇到该问题rn
为什么xmlhttp不到数据????
用Response.Write()rn输出:rnrn rnrn okrnrnrnrnrn用xmlhttp获取rnrnvar xmlDoc = xmlhttp.responseXML;//有object,非nullrn//var root = xmlDoc.documentElement; rnvar node = xmlDoc.getElementsByTagName('info');//有object,非nullrnrnvar str = node[0].firstChild.data;//这里却是null!!!!!!用node[0].firstChild.nodeValue;也不行。。。rn rnrnalert(str);
不到数据'800a0bcd' 错误
rnrn当查询<em>不到</em><em>数据</em>的时候,就会报 800a0bcd 错误,请问代码哪儿需要改正?
数据库里老师不到数据
if (this.IsValid)rn rn string pwd= this.txtPassword.Text.ToString();rn //Commons.DbTools DbTools = new Commons.DbTools();rn string Pwd = Commons.DbTools.Md5(pwd); //调用DbTool的Md5方法来对密码加密rn //pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "MD5"); //此种方法与上面的效果一样rn string sql = "select * from users where UserName='" + this.txtUserName.Text.ToString() + "' and Password='" + Pwd + "'";rn Common common = new Common();rn DataSet ds= common.GetDataSet(sql);rnrn if (ds.Tables[0].Rows.Count > 0)rn rn this.Response.Redirect("main.aspx");rn rn elsern rn DbTools.MsgBox("用户名或密码错误!");rn rn rnrn/////////////////////////////////////////////////////rn就是这段验证用户登录的代码,老是从<em>数据</em>库都<em>不到</em><em>数据</em>,所以登录时总是("用户名或密码错误!"不知道咋回事,急死了,rn配置文件没有写错,因为可以从<em>数据</em>库导出<em>数据</em>来。不知道什么原因
sqlite 速度慢的问题
我的环境 vs2010 + sqlite.net + ef4.3 + dbcontext generatorrnrnrn我在程序中第一次调用<em>数据</em>库,不管是增改删查 都很慢(要等1-2秒), 然后的<em>数据</em>库操作 速度就很正常了rnrn我找了很久 发现rnhttp://www.cnblogs.com/osiris/articles/2013622.htmlrnrn这篇文章说是rn“如果你为了图省事不想建立<em>SQLite</em>Connection,直接建立DataContext”的原因rnrn如是我修改了 DbContext的创建 代码如下rnrn1.修改一rnC# codern public partial class CodeLibraryEntities : DbContextrn rn rn private static DbCompiledModel GetDbCompiledModel()rn rn string connstr = ConfigurationManager.ConnectionStrings["CodeLibraryEntities"].ConnectionString;rnrn connstr = connstr.Remove(0, connstr.IndexOf("provider connection string=\"") + "provider connection string=\"".Length );rn connstr = connstr.Remove(connstr.IndexOf("\""));rnrn DbModelBuilder modelBuilder = new DbModelBuilder();rn var conn = new System.Data.<em>SQLite</em>.<em>SQLite</em>Connection(connstr);rn DbModel model = modelBuilder.Build(conn);rn return model.Compile();rnrn rnrn public CodeLibraryEntities()rn : base("Name=CodeLibraryEntities", GetDbCompiledModel())rn rnrn rnrn 。。。。。。。。。。。。。。。。。rnrnrnrnrnrn 报 rn“System.InvalidOperationException: Cannot initialize a DbContext from an entity connection string or an EntityConnection instance together with a DbCompiledModel. If an entity connection string or EntityConnection instance is used, then the model will be created from the metadata in the connection. If a DbCompiledModel is used, then the connection supplied should be a standard database connection (for example, a SqlConnection instance) rather than an entity connection.” 错误rnrnrn2.修改二rnC# codern public partial class CodeLibraryEntities : DbContextrn rn public static System.Data.<em>SQLite</em>.<em>SQLite</em>Connection Get<em>SQLite</em>Connection()rn rn string connstr = ConfigurationManager.ConnectionStrings["CodeLibraryEntities"].ConnectionString;rnrn connstr = connstr.Remove(0, connstr.IndexOf("provider connection string=\"") + "provider connection string=\"".Length);rn connstr = connstr.Remove(connstr.IndexOf("\""));rnrn return new System.Data.<em>SQLite</em>.<em>SQLite</em>Connection(connstr);rnrn rn public CodeLibraryEntities()rn : base(Get<em>SQLite</em>Connection(), true)rn rnrn rn。。。。。。。。。。。。。。。。。。。。。。。rnrnrnrnrnrnrnrnrn 报错 rn"System.Data.Entity.Infrastructure.UnintentionalCodeFirstException: Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception."rnrn问题1. 我应该怎么改动rnrn问题2. 这样的改动能提高操作sqlite<em>数据</em>库的速度吗?
串口 read函数 图片的时候为何不到数据
我用read函数随时准备去<em>读</em>串口传来的<em>数据</em> read能接收到ok error 之类的<em>数据</em> 但是当我用来接收jpeg格式的图片的时候就<em>读</em><em>不到</em><em>数据</em>了 why??? (我的图片比较小 所以buf能容纳的开)rnrnread(fd, buf, 1024*50);
不到app.config的值
两个工程(一个控制台应用程序、一个类库)在Console Application里面配置一个app.config,然后在类库里<em>读</em>取app.config的值rn:rnrnapp.configrnrnrnrn rn rn rn rnrnrn类库:rnprivate static string cs=string.Empty;rn public static string ConnStringrn rn get rn if (cs == string.Empty)rn cs= System.Configuration.ConfigurationManager.AppSettings["ss"];rn return cs; rn rn rn rn rnprivate static string dbp = string.Empty;rnrn public static string DbProviderrn rn get rn if (dbp == string.Empty)rn dbp = System.Configuration.ConfigurationManager.AppSettings["db"];rn return dbp; rn rn rnrn跟踪后发现cs 和 dbp 都是空置,System.Configuration.ConfigurationManager.AppSettings["ss"]; 和System.Configuration.ConfigurationManager.AppSettings["db"];rn都执行了,但返回的都是null
为何不到文件
#include rn#include rn#include rn#include rn#include rn#include rn#include "Read.h"rnusing namespace std;rnrnrnvoid main(int argc, char* argv[]) rn rn string str;rn rn ifstream InFile("E:\\Project\\Read\\test");rn ofstream OutFile("E:\\Project\\Read\\test_test");rn if (!InFile) rn cerr << "Unable to open the file:test.txt!" << endl;rn exit(-1);rn rn if(!OutFile) rn cerr<<
C#取配置文件不到
[img=https://img-bbs.csdn.net/upload/201806/08/1528425334_386398.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201806/08/1528424659_895299.jpg][/img]rn调试发现我配置文件里写的URL在程序中<em>读</em>取<em>不到</em> 为null,上网查了半天也没发现问题在哪,哪位知道的 指点一下[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/2.gif][/img
Frame 不到jquery对象$
我的排版是上中下;所以我就用的三个Frame;rnrn然后我在其中的一个的内容页要用jqueryrnrn可是老提示"$"<em>读</em><em>不到</em>;rnrn rnrnrn function Open6() rn [color=#FF0000] var s = $("#Text1").val();[/color] alert(s);rn rnrnJS我也有引进去的,为什么还是不行呢
C++取文件 不到···
#include "stdafx.h"rn#include rn#include rn#include rn#include rnint main()rn rn using namespace std;rn struct tuanti rn string xingm;rn double qian;rn ;rn ifstream duqu1;rn string wenjianm;rn cout<>wenjianm;rn duqu1.open(wenjianm,ios::in);rn if (!duqu1.is_open())rn rn cout<>h;rn cout<<>qc[i].xingm;rn duqu1>>qc[i].qian;rn rn rn rn for (int x=0;x
win10不到移动硬盘
我的硬盘连接在电脑上,然后我关机后,在启动就<em>读</em><em>不到</em>硬盘了,拔掉线。重启电脑还是不行。   解决办法: 1.打开设备和打印机 2.右键 删掉usb3.0 3.重启动电脑,插移动硬盘,就好了。    ...
config文件不到
环境:iplanet web server 6.0rn我把config文件放到了WEB-INF\lib下,通过web service方式deploy后无法<em>读</em>到。rnrn该怎么做?
不到数据库的记录
while (list($id,$code,$name)=mssql_fetch_row($rs)) rn$j++; rn$rs_id[$j]=$id; rn$rs_code[$j]=$code; rn$rs_name[$j]=$name; rnrnrn$strResult= "序号编码名称"; rnrnfor ($i=1;$i; rnrnecho $strResult;rnrn结果取<em>不到</em><em>数据</em>记录,如果在for循环里单独写个echo $rs_name[$i];可以取到<em>数据</em>的rn不知道是不是语法上的问题,大家帮忙看看
file_get_contents不到内容
file_get_contents有时<em>读</em>得到,有时<em>读</em><em>不到</em>,郁闷rn$ch = curl_init(); rn curl_setopt($ch, CURLOPT_REFERER, $url); rn curl_setopt($ch,CURLOPT_HTTPHEADER,$header); rn curl_setopt($ch, CURLOPT_USERAGENT, $useragent);rn curl_setopt($ch, CURLOPT_URL,$url); rn curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); rn $txt = curl_exec($ch); rnrn这个也不行,显示302 found
不到文件 jar!
介绍问题 本次遇见的问题是 本地跑程序的时候可以正常运行 但是发布到测试环境的时候报错 原因 看了下日志信息 发现报错 报<em>读</em><em>不到</em>文件 jar!/xxxx/xxx.pem 解决方案 修改源代码 把里面的配置文件从先获取路径到直接获得文件流的形式来解决这个问题 File f = new File(privateKeyPath); ...
scanf不到浮点数
环境 fedora 14, gcc4.5.1rn运行下面的程序输入一个浮点数,输出 始终是1.000000,求解rnrn#include rnrnint main()rnrn double d = 1.0;rn scanf("%f", &d);rn printf("%f\n", d);rnrn return 0;rnrn
不到的childNode
[code=html] rn Arn rn Irene Andersrn rnrnrn Brnrn Crnrn Drnrn Ernrnrn Frnrnrn Grnrn Hrnrn Irnrn Jrnrn Krnrn Lrnrn Mrnrn Nrn Orn Prn Qrn Rrn Srn Trn Urn Vrn Wrnrn Xrn Yrn Zrn[/code]rnrnjavascript如下[code=javascript]var list = document.getElementById("list");rnalert(list);[/code]rnrnalert结果是null 希望能<em>读</em>到div里的childNodes
为何不到一起?
我想将两个doc文件的内容合并到一个doc文件,程序如下:rnrnimport java.io.*;rnrnpublic class WordTest rn public static void main(String[] args) throws IOException rn FileInputStream in1 = new FileInputStream("1.doc");rn FileInputStream in2 = new FileInputStream("2.doc");rn int s1,s2;rn FileOutputStream out = new FileOutputStream("3.doc");rn while ( (s1 = in1.read()) != -1 ) rn out.write(s1);rn rn in1.close();rn while ( (s2 = in2.read()) != -1 ) rn out.write(s2);rn rn in2.close();rn out.close();rn rnrnrn可是3.doc却只是<em>读</em>入了1.doc的内容,为什么啊?
ini文件不到
函数写在OnLbnSelchangeList4()里,rn FILE *filname;rn if((filname = fopen(".\\*.ini","r")) == NULL) return;rn char *Line = new char[512];rn memset(Line,0,512);rnrn while(!feof(filname) )rn rn fgets(Line,512, filname);rnrn m_list3.AddString(Line);rn rn delete Line;rn fclose(filname);rnrn但是文件就是<em>读</em><em>不到</em>,Line只得到?,哪里的问题?
不到app.config配置文件
app.configrnrnrn rn rn rn rn rn rn rnrnrnstrDBCon = String.Format("server=0;database=1;uid=2;pwd=3;path=4", rnConfigurationSettings.AppSettings["ServerIP"], ConfigurationSettings.AppSettings["Database"], rnConfigurationSettings.AppSettings["uid"],rnConfigurationSettings.AppSettings["pwd"],rnConfigurationSettings.AppSettings["Path"]);rnstrPath = ConfigurationSettings.AppSettings["Path"].ToString();rnrn就是<em>读</em>不出来,rnrn提示信息是“未能找到key的架构信息”rnrn请各位帮忙看看哪里有问题,异或是别的地方出了问题,小弟没有经验,谢谢
oracle数据不到
系统2003,.net2005连接oracle,<em>读</em><em>不到</em><em>数据</em>,是空的,为什么啊
为什么不到键盘输入
我再对话类中假如WM_CHAR处理函数,但是取<em>不到</em>键盘值,调试也进<em>不到</em>函数里去
dropdownlist 不到
前台 页面 rn rn rn Ⅰ Ⅱ Ⅲ Ⅲ-Ⅳ ⅣⅣ-Ⅴ ⅤⅤ-Ⅵ Ⅵ rn rn rnrn后台 rn id = Request.QueryString["id"].ToString();rnrn // id = "asd_f";rn if (!Page.IsPostBack)rn rn this.DropDownList2.DataSource = this.ExcuteReadApdater("Select * from 新自动水表用水单位", CommandType.Text, null);rn this.DropDownList2.DataTextField = "用户名称";rn this.DropDownList2.DataValueField = "编号";rn this.DropDownList2.DataBind();rn rn rn string sql = "select * from 新自动水表机井资料 where 机井编号='" +id+ "'";rn rn SqlDataReader dr=this.ExcuteRead("select * from 新自动水表机井资料 where 机井编号='"+id + "'",CommandType.Text,null);rnrn if (dr.Read())rn this.DropDownList7.Text = dr["使用类型"].ToString();rn // this.DropDownList1.Text = dr["含水组"].ToString();rn // this.DropDownList7.Text = dr["使用类型"].ToString();rn this.DropDownList1.text= dr["含水组"].ToString();rnrnrnrnrn 其它的 DropDownList 都可以<em>读</em>到数值 ,就是DropDownList1 取<em>不到</em>值 怎么回事 ,老是显示默认的Ⅰ ,我用response。write (["含水组"].ToString()); 都可以显示值 ,不知这是怎么回事啊 rnrnrnrn
fread() 不到EOF?
[code=c]#include rn#define RECORD_LENGTH_ sizeof(char)*20+sizeof(unsigned int)+sizeof(double)rnrntypedef struct RECORD_TAGrn unsigned int record_number;rn long index_n; //rn Detailed_record *record;rn struct RECORD_TAG *fwd;rn struct RECORD_TAG *bwd;rn Index;rnrnIndex index_entry;rnrnint create_index(FILE *file_stream)rn Index *new_node;rn Index *current_node=&index_entry;rn Index *previous_node=NULL;rnrn rewind(file_stream);rn while(!feof(file_stream))rn new_node=malloc(sizeof(Index));rn if(new_node==NULL)rn free_all_nodes();//如果动态分配内存失败,释放所有已分配的内存rn printf("No enough memory!\n");rn return 1;rn rnrnrn current_node->fwd=new_node;rn current_node->bwd=previous_node;rn new_node->bwd=(current_node==&index_entry?NULL:current_node);rn new_node->fwd=NULL;rnrn previous_node=current_node;rn current_node=current_node->fwd;rnrn new_node->index_n=ftell(file_stream);rn new_node->record=NULL;rn fread(&new_node->record_number,sizeof(unsigned int),1,file_stream);rn fseek(file_stream, RECORD_LENGTH_, SEEK_CUR);rn rn index_entry.bwd=new_node;rn return 0;rnrn[/code]rnrn补充::FILE *file_stream=fopen("C:\db","a+b");。rnrn现在的问题是,文件里面的记录为:rnrn000000 01000000 20666666 20202020 20202020 *.... fff *rn000016 20202020 20202020 0C000000 9A999999 * ........*rn000032 99D95E40 01000000 2033322E 20202020 *..^@.... 32. *rn000048 20202020 20202020 20202020 21000000 * !...*rn000064 9A999999 99193640 02000000 20333320 *......6@.... 33 *rn000080 20202020 20202020 20202020 20202020 * *rn000096 2C000000 00000000 00803640 03000000 *,.........6@....*rn000112 20637265 75687520 20202020 20202020 * creuhu *rn000128 20202020 63000000 00000000 00C05440 * c.........T@*rnrnrn前面的00....是十进制数值。调试时,ftell(file_stream)达到144以后,feof(file_stream)仍返回0;之后无论如何feof()都返回0。这是什么原因?望指点。
C# ado取Excel 不到数据
1.ADO连接字符串(正确,没有问题)  if (isAce12(ExcelFileName))             {                 strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + ExcelFileName +                      ";Extended Prop
ext2 分页的时候为什么不到数据
rnrn rnrnrnrn**********上面为建立一个含有分页工具栏的girpanel 具体的<em>数据</em>从gril.html中<em>读</em>取rn下面为gril.html的代码rntotalProperty:100,root:[id:0,name:'name0',descn:'descn0',id:1,name:'name1',descn:'descn1',id:2,name:'name2',descn:'descn2',id:3,name:'name3',descn:'descn3',id:4,name:'name4',descn:'descn4',id:5,name:'name5',descn:'descn5',id:6,name:'name6',descn:'descn6',id:7,name:'name7',descn:'descn7',id:8,name:'name8',descn:'descn8',id:9,name:'name9',descn:'descn9'] rnrnrngrilpanel已经显示出来 分页的工具栏也已经显示出来了 但是就是没有<em>数据</em>为什么呢?? 先排除路径问题放的是同一个目录rnrn
为什么缓冲区内有数据不到 ???????
[color=#FF0000]if(m_ctrlComm.GetCommEvent()==2) //事件值为2表示接收缓冲区内有字符rn rn rn variant_inp=m_ctrlComm.GetInput(); //<em>读</em>缓冲区[/color] safearray_inp=variant_inp; //VARIANT型变量转换为ColeSafeArray型变量rn len=safearray_inp.GetOneDimSize(); //得到有效<em>数据</em>长度rn for(k=0;kSetWindowText(m_strEditRXData) ;rn rn rnrn上面的程序是串口通信的一部分代码,红色标注的if语句已经满足了,即表示缓冲区内有<em>数据</em>,rn可是我用GetInput函数<em>读</em>的<em>数据</em>却是空的,这是为什么 ?rnrn谁给解决了多加分,谢谢啦
Kafka 远程消费者不到数据
问题描述 &amp;amp;amp;nbsp;&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;服务器上使用脚本测试 producer &amp;amp;amp;amp; consumer 可生产 &amp;amp;amp;amp; 消费信息,但在使用 Java 代码远程作为消费者时,代码却卡在 comsumer.poll(long timeout) 不往下进行。 解决方式 &amp;amp;amp;nbsp;&amp;amp;amp;nbsp;&a
content provider为什么不到电话薄数据
android系统自带了一些content provider,比如电话薄,外部的程序可以<em>读</em>取到电话薄的内容,我写了一些简单的程序,在这个程序中访问电话薄,可以<em>读</em>出电话薄里面的内容。但是当我把这个程序安装到手机上的时候(我的手机是华为U8500),却<em>读</em>取<em>不到</em>手机上的电话薄,这个原因何在?请知道的给解答下...
proteus,仿真8086,不到数据。。。求助
端口地址定义:rnIOY2 EQU 9020h; 8255rnM8255_A EQU IOY2+00H*4 rnM8255_B EQU IOY2+01H*4 rnM8255_C EQU IOY2+02H*4 rnM8255_MODE EQU IOY2+03H*4 rnrn mov dx,M8255_MODE rn mov al,082h ;a输出 B输入 rn out dx,al rnrnmov dx,M8255_B rnin al, dx ;<em>读</em>b口<em>数据</em> rn怎么接 al里面的<em>读</em><em>不到</em>B口的<em>数据</em> (地址应该没算错、、A口可以输出<em>数据</em>) 求解释啊各位[img=http://hiphotos.baidu.com/catonlion/pic/item/27f96ff1d72a60595d6a79512834349b023bba06.jpg][/img]rn
好奇怪~~~POST不到数据
原版的html代码是这样子滴,我也不知道是哪里出错了。。。反正就是在insert_user.php里用$_POST["user_name"]<em>读</em><em>不到</em><em>数据</em>。。。它会给我提示用户名为空。。。rnrnrnrnrn rn rn rn 注册rn rnrn rnrn rn rn rn rn 用户名:*rn 请输入密码:*rn 请输入8-12位由数字、字母组成的密码rn 请再次输入密码:*rn 邮 箱:rn 性 别:rn rn 选择性别rn 男rn 女rn rn rn 电话号码:rn 我认真阅<em>读</em>并接受协议。rn *为必填项目rn rn rn rn rn rnrn rnrnrnrn
grid 不到数据表中数据
我在grid中插入的<em>数据</em>,它都可以显示出来,<em>数据</em>库中也有,可是我直接插入<em>数据</em>库的记录,它就显示不出来,请问这是为什么?
我的OleDbDataReader.Read()方法不到数据
myConn.Open();rn OleDbCommand cmd = myConn.CreateCommand();rn cmd.CommandText = strCom;rn OleDbDataReader reader;rn reader = cmd.ExecuteReader();rn StringBuilder sb = new StringBuilder();rn while (reader.Read())rn rn ...rn rn这就是部分代码rn连接<em>数据</em>库成功,但是始终进不去while循环
串口通信 总是不到数据呢?
关键的代码贴在这里 高手帮我看下啊!rn下面是个异步串口:rn[code=C/C++]DWORD WINAPI CThreadCom::ComThread(LPVOID lPara)rnrn CThreadCom * pCom = (CThreadCom * )lPara;rnrn if (!SetCommMask(pCom->m_hCom, EV_RXCHAR | EV_ERR))rn rn return 0;rn rnrn COMSTAT nStat;rn DWORD dwErr;rnrn for (DWORD dwLen, dwMask = 0; pCom->m_bRunFlag && pCom->IsOpen(); dwMask = 0)rn rn if (!WaitCommEvent(pCom->m_hCom, &dwMask, &pCom->m_oWait))rn rn if (GetLastError() == ERROR_IO_PENDING)rn rn GetOverlappedResult(pCom->m_hCom, &pCom->m_oWait, &dwLen, TRUE);rn rn rn rnrn if (dwMask & EV_ERR)rn ClearCommError(pCom->m_hCom, &dwErr, &nStat); [color=#0000FF]//ClearCommError 到底是干什么用的?[/color]rn rn if (dwMask & EV_RXCHAR)rn rn if(!ClearCommError(pCom->m_hCom, &dwErr, &nStat))rn MessageBox("ClearCommError 失败");rn if (nStat.cbInQue > pCom->m_lNotifyNum)rn rn pCom->OnReceive(); //在这个函数中::PostMessage(m_hwndNotify, ON_COM_RECEIVE, WPARAM(m_nPort), LPARAM(0));rn rn rn rn rn return 0;rnrnrn<em>读</em>COMrnint Read(char * chBuf, int nSize)rnrn if (!IsOpen())rn return 0;rn rn if (chBuf == NULL)rn return 0;rnrn chBuf[0] = '\0';rnrn COMSTAT nStat;rn DWORD dwError;rnrn [color=#993300]if (ClearCommError(m_hCom, &dwError, &nStat)) rn rn PurgeComm(m_hCom, PURGE_RXCLEAR | PURGE_RXABORT); //老是执行到这里了 不明白上面那个函数到底是做什么用的[/color]rn return 0;rn rnrn unsigned long lLen = 0;rnrn nSize = min(nSize - 1, (int)nStat.cbInQue);rn if (!ReadFile(m_hCom, chBuf, nSize, &lLen, NULL))rn lLen = 0;rnrn chBuf[lLen] = '\0';rnrn return lLen;rnrn[/code]rnrn
为什么我的串口通信不到发来的数据
代码如下:rn BYTE* Com1Device::reDataBuffer()rnrn char * Buffer=NULL;rn Buffer=new char[1024];rn ZeroMemory(Buffer,sizeof(char)*(1024));rn m_Com2->Read(Buffer,sizeof(char)*1024);rn return (BYTE*)Buffer;rnrn这是一个<em>读</em>取串口<em>数据</em>的函数 其中Read();函数是没问题的我测试过。是不是我这个函数写的有问题啊?各位高手帮帮忙,小弟在次先谢了。
oracle中blob字段不到数据
[code=Delphi(Pascal)]rnrn Close;rn SQL.Text := 'select tid,tdata from device_param where tid=' + IntToStr(vid) ;rn Open;rnrn First;rn if not Eof thenrn beginrn (FieldByName('tdata') as TBlobField).SaveToStream(ms);rn ms.Position :=0;rn ms.read(RecBuf[0],129);rnrn[/code]rn在oracle中能查询到blob字段的<em>数据</em>长度129,但无法<em>读</em>取到<em>数据</em>,ms的大小为0
取excel时,第一行数据不到
代码如下,第一行<em>读</em><em>不到</em>,输出的rows.count总是少了1,后面所有行<em>数据</em>都能<em>读</em>到。。rn string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + ofd.FileName + ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1;'";rn OleDbDataAdapter adapter = new OleDbDataAdapter("select * from [Sheet1$]", strConn);rn DataSet ds = new DataSet();rn adapter.Fill(ds, "sheet1");rn DataTable dt=ds.Tables[0];rn System.Console.WriteLine("rows count is "+dt.Rows.Count);
API实现串口通讯,不到正确的数据
发送“123”的话就会显示一长串的烫rn[img=https://img-bbs.csdn.net/upload/201607/23/1469288894_878428.png][/img]rn看样子输入缓冲区也没清空rn如果改成只接收单个字符的程序rn也还是收到乱码rn不管发送'1'还是'2'都显示‘Ì’rn求指教啊~~rnrnstruct ParameterrnrnCOMConfig* c;rnCBLDDlg* dlg;rn;rnrn完整的代码有点长,删减了一些不相关的rn这是开启的线程里的一部分内容:rnUINT ThreadFunc(LPVOID lpParam)rnrnrn Event = WaitForMultipleObjects(3,comConfig->m_hEventArray,FALSE,INFINITE);rn switch(Event)rn rn case 0:rn rn //关闭串口操作rn rn case 1:rn rn GetCommMask(comConfig->m_hComm,&CommEvent);//获取当前通信事件rn if(CommEvent & EV_RXCHAR) rn dlg->ReceiveChar(comConfig,100);rnrn AfxMessageBox(_T("<em>读</em>事件")); rn break;rn rn case 2:rn rn //写<em>数据</em>操作rn rn rnrn rnreturn 0;rnrnrn然后主要是下面<em>读</em><em>数据</em>的函数:rnvoid CBLDDlg::ReceiveChar(LPVOID lpParam, DWORD dwLength)rnrnBOOL bRead = TRUE;rnBOOL bResult = TRUE;rnDWORD dwError = 0;rnCOMConfig* comConfig = (COMConfig*)lpParam; rnDWORD length = 0;rnCString str;rnchar RXBuff[100];rnInitializeCriticalSection(&cs);rnrnfor (;;)rnrn EnterCriticalSection(&cs);rnrn bResult = ClearCommError(comConfig->m_hComm, &dwError, &(comConfig->comstat));rnrn LeaveCriticalSection(&cs);rnrn if (comConfig->comstat.cbInQue == 0)rn rn break;rn rnrn EnterCriticalSection(&cs);rnrn length=min(dwLength, comConfig->comstat.cbInQue);rnrn if (bRead)rn rn //<em>读</em><em>数据</em>rn bResult = ReadFile(comConfig->m_hComm, // Handle to COMM portrn RXBuff, // RX Buffer Pointerrn length, // Read one bytern &length, // Stores number of bytes readrn &(comConfig->m_ov)); // pointer to the m_ov structurernrn CString str(RXBuff);rn m_strEditReceiveMsg = str;rnrn GetDlgItem(IDC_receive)->SetWindowText(str);//显示在控件中rnrn if (!bResult)rn rn switch (dwError = GetLastError())rn rn case ERROR_IO_PENDING:rn rn bRead = FALSE;rn break;rn rn default:rn rn break;rn rn rn rn elsern rn bRead = TRUE;rn rn // close if (bRead)rn if (!bRead)rn rn bRead = TRUE;rn bResult = GetOverlappedResult(comConfig->m_hComm, // Handle to COMM portrn &(comConfig->m_ov), // Overlapped structurern &length, // Stores number of bytes readrn TRUE); // Wait flagrn if(!bResult)rn rn AfxMessageBox(_T("GetOverlappedResults()in ReadFile()"));rn rnrn SetCommMask(comConfig->m_ov.hEvent,EV_RXCHAR);//重置为有信号rnrn LeaveCriticalSection(&cs);rn rnrnrnrn求各位帮忙!谢谢~~
EXTJS AJAX 为何不到数据
在研究 EXTJS MVC例子。rn代码见后边,如果用屏蔽的就能正常<em>读</em>到<em>数据</em>并显示,而用代理就<em>读</em><em>不到</em><em>数据</em>,rn用Chrome调试,显示的是 rnrnOPTIONS file:///D:/xampp/htdocs/TestMVC/data/users.json?_dc=1381904422657&page=1&start=0&limit=25 Origin null is not allowed by Access-Control-Allow-Origin. ext-all.js:21rnExt.cmd.derive.request ext-all.js:21rnExt.cmd.derive.doRequest ext-all.js:21rnExt.cmd.derive.read ext-all.js:21rnExt.cmd.derive.load ext-all.js:21rnb.implement.callParent ext-all.js:21rnExt.cmd.derive.load ext-all.js:21rn(anonymous function) ext-all.js:21rnXMLHttpRequest cannot load file:///D:/xampp/htdocs/TestMVC/data/users.json?_dc=1381904422657&page=1&start=0&limit=25. Origin null is not allowed by Access-Control-Allow-Origin. index.html:1rnrnrn按照网上搜索的方法,在Chrome 快捷方式增加参数 –disable-web-security ,但结果一样,rn用FirFox 也<em>读</em><em>不到</em><em>数据</em>,很奇怪,不知道各位有遇到否?rnrn[code=javascript]Ext.define('AM.store.Users', rn extend: 'Ext.data.Store',rn model: 'AM.model.User', rn rn autoLoad: true,rn /* 直接定义<em>数据</em>就正常,而用下边的proxy就<em>读</em><em>不到</em><em>数据</em>,当然那个文件是存在的 rn data: [rn name: 'Ed', email: 'ed@sencha.com',rn name: 'Tommy', email: 'tommy@sencha.com'rn ]rn*/rnrn proxy: rn type: 'ajax',rn api: rn read: 'data/users.json',rn update: 'data/updateUsers.json'rn ,rn reader: rn type: 'json',rn root: 'users',rn successProperty: 'success'rn rn rnrn);[/code]
相当奇怪的一件事,DATAREADER不到数据
很简单的一段代码rnSqlConnection con = new SqlConnection(DataAccess.connectString);rncon.Open();rnSqlCommand com = con.CreateCommand();rncom.CommandText = sql;rnSqlDataReader dr = com.ExecuteReader();rnrn其中sql是sql语句正常传给CommandText了rn调试的时候在立即命令窗口内显示con和com都是正常的rn但dr显示如下:rndrrnSystem.Data.SqlClient.SqlDataReaderrn System.MarshalByRefObject: System.Data.SqlClient.SqlDataReaderrn _behavior: Defaultrn _browseModeInfoConsumed: falsern _comBuf: rn _command: System.Data.SqlClient.SqlCommandrn _currCol: -1rn _dataReady: falsern _defaultLCID: 2052rn _fieldNameLookup: rn _haltRead: falsern _hasRows: falsern _indexMap: Length=3rn _isClosed: falsern _metaData: rn _metaDataConsumed: falsern _parser: rn _peekIsNull: falsern _peekLength: -1rn _recordsAffected: -1rn _rowException: rn _schemaTable: rn _seqBytesLeft: 0rn _seqBytesRead: 0rn _setOptions: nullrn _sqlBuf: rn _tableNames: rn _tableNamesShilohSP1: rn _visibleColumns: 3rn Depth: 0rn FieldCount: 0rn HasMoreResults: falsern HasMoreRows: falsern HasRows: falsern IsClosed: falsern Item: rn Item: rn MetaData: rn RecordsAffected: -1rn TableNames: rn TableNamesShilohSP1: rn按道理应该也是<em>读</em>到了<em>数据</em>的 rn但是用dr.read显示为没有<em>读</em>到任何有效的<em>数据</em>rn请问这是怎么一回事,怪死了,调了好多天了rn请大侠相救
write成功,read阻塞,不到数据
帮看下rn执行如下:rn[weihu@nagios http_get]$ ./t1_2rnGET /ccinterface/Service.asmx/GetRealTimeInfo?queueid= HTTP/1.1rnHost: 10.127.2.123rnrnclient write 85 bytes .rnselect ok.rn这里停了rnrn[code=c]rn#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rnrn#define LEN 1024rn#define HIS_PORT 80rn#define HIS_IPADDR "10.127.2.123"rnrnint get_url(char http_get_url[4096]) rn int ret,i;rn char readbuf[LEN];rnrn int mark=0;rn char *p,*str;rn fd_set rfds;rn struct timeval tv;rnrn int sd;rn struct sockaddr_in his_end;rnrn sd=socket(AF_INET,SOCK_STREAM,0);rn if(sd==-1) rn fprintf(stderr,"socket error.\n");rn exit(-1);rn rnrn his_end.sin_family=AF_INET;rn his_end.sin_port=htons(HIS_PORT);rn his_end.sin_addr.s_addr=inet_addr(HIS_IPADDR);rnrn ret=connect(sd,(struct sockaddr *)&his_end,sizeof(his_end));rn if(ret==-1) rn perror("connect()");rn exit(-1);rn rnrn ret=write(sd,http_get_url,strlen(http_get_url));rn if(ret0) rn memset(readbuf,0,4096);rnrn ret=read(sd,readbuf,4095);rn if(ret==0)rn close(sd);rn return -1;rn rnrn printf("%s\n",readbuf);rn printf("--------------------\n");rnrn break;rn rn rnrn ret=close(sd);rnrn return 0;rnrnrnint main(int argc, char *argv[]) rn int ret,i;rn char http_get_url[4096];rnrn //prepare datern memset(http_get_url,0,4096);rn strcat(http_get_url,"GET /ccinterface/Service.asmx/GetRealTimeInfo?queueid= HTTP/1.1\n");rn strcat(http_get_url,"Host: 10.127.2.123\n\r\n");rnrn printf("%s",http_get_url);rnrn get_url(http_get_url);rnrn return 0;rnrn[/code]
VB winsock 不到PLC数据
用TCP&UDP测试工具能够<em>读</em>到值 500rn[img=https://img-bbs.csdn.net/upload/201904/20/1555737658_571836.png][/img]rnrnrnVB调用winsock<em>读</em>到的为0,应是没有<em>读</em>到rn[img=https://img-bbs.csdn.net/upload/201904/20/1555737880_13321.png][/img]rnrn连接rn[img=https://img-bbs.csdn.net/upload/201904/20/1555737956_879377.png][/img]rnrn<em>读</em>取rn[img=https://img-bbs.csdn.net/upload/201904/20/1555738017_205801.png][/img]rnrn<em>数据</em>处理rnrnrn
c#实现串口通信不到数据
using JustinIO;rnJustinIO.CommPort ss_port = new JustinIO.CommPort;rn ss_port.PortNum = 1;//端口号rnss_port.BaudRate = 19200; //串口通信波特率rnss_port.ByteSize = 8; //<em>数据</em>位rnss_port.Parity = 0; //奇偶校验rnss_port.StopBits = 1;//停止位rnss_port.ReadTimeout = 1000; //<em>读</em>超时rnbyte[] WriteBytes=Encoding.ASCII.GetBytes("AT+CGMI\r");rn rntryrnrnif (ss_port.Opened)rnrn  ss_port.Close();rn   ss_port.Open(); //打开串口rn ss_port.Write(WriteBytes); rn string response = Encoding.ASCII.GetString(ss_port.Read(128));rn rn  elsern  rn  ss_port.Open(); //打开串口rn ss_port.Write(WriteBytes); rn string response1 = Encoding.ASCII.GetString(ss_port.Read(128));rn Console.WriteLine(response1);rn ...rn调试没有问题,为何没有<em>读</em>出<em>数据</em>?rnrn其中JustinIO是<em>读</em>写公共类,没有问题。
为什么GetPrivateProfileString不到数据
BOOL WINAPI DllMain(HMODULE hModule,DWORD u_reason,LPVOID Temp)rnrn if (u_reason==DLL_PROCESS_ATTACH)rn rn char ip[16];rn DWORD num=0;rn num=GetPrivateProfileString("Mokey","Ming","", ip,sizeof(ip), "C:\xxx.ini");rn //这里ip一直<em>读</em><em>不到</em><em>数据</em>,请问怎么回事?在dll中不能<em>读</em>吗?rn rn return TRUE;rnrnrnrn我试了,相同的代码,在exe中完全可以<em>读</em>到<em>数据</em>的,请大神指点啊!
串口不到数据的奇怪现象
本人曾做过与串口的通信工程,对串口也算有一定的了解,可是这次遇到的问题比较特殊。rn现象如下:rn1、与测量仪器通信时,我的程序能传<em>数据</em>到仪器,但仪器返回的<em>数据</em>就是收<em>不到</em>;rn[color=#FF6600]2、奇怪的地方是:当发送指令后没接收到<em>数据</em>,在本程序中关闭串口后,用串口调试精灵打开该串口时,<em>数据</em>接收到了。[/color]rn3、用ser232Mon监视串口,发现本程序把<em>数据</em>送到缓冲区后,接收缓冲区无字符;rn4、用串口调试精灵发送相同指令,ser232Mon立即接收到返回<em>数据</em>;rnrn思考和试解决过程:rn1、既然通信仪器接发<em>数据</em>正常,排除线路、协议、本程序发送指令的问题;检查MSComm控件设置无问题;rn2、我开始以为是本程序发送指令后,仪器有硬件握手协议,致使仪器想要传送给PC,却认为PC未准备好,从而未传送,可是再想也不对:为什么串口精灵可以收到呢?rn3、除了串口调试精灵外,我下载了一些其它的串口调试工具,有的可以收到<em>数据</em>,有的也和我的程序一样收<em>不到</em><em>数据</em>;rnrn不知道哪位仁兄有好的思路或有过类似的经历,希望得到您的指导,谢谢!
C#写串口数据不到
如题,代码如下:rn[code=C#]using System;rnusing System.Collections.Generic;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Text;rnusing System.Windows.Forms;rnusing System.IO.Ports;rnrnnamespace WindowsApplication1rnrn public partial class Form1 : Formrn rn public Form1()rn rn InitializeComponent();rn rnrn rn SerialPort port1=new SerialPort();rnrn rn //接收<em>数据</em>rn private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)rn rnrn // <em>读</em>取缓冲区的<em>数据</em>rn string data = port1.ReadExisting();rn textBox1.Text = data;rn rnrnrn //初始化SerialPort对象方法.PortName为COM口名称,例如"COM1","COM2"等,注意是string类型rn public void InitCOM(string PortName)rn rn port1 = new SerialPort(PortName);rn port1.BaudRate = 9600;//波特率rn port1.Parity = Parity.None;//无奇偶校验位rn port1.StopBits = StopBits.One;//两个停止位rn port1.DataBits = 8;rn rn //DataReceived事件委托方法rn private void port1_DataReceived(object sender, SerialDataReceivedEventArgs e)rn rn // <em>读</em>取缓冲区的<em>数据</em>rn string data = port1.ReadExisting();rn textBox1.Text = data;rn rnrn //打开串口的方法rn public void OpenPort()rn rn tryrn rn port1.Open();rn rn catchrn rnrn rn if (port1.IsOpen)rn rn Console.WriteLine("the port is opened");rn rn elsern rnrn Console.WriteLine("failure to open the port");rn rnrn rnrn //关闭串口rn public void ClosePort()rn rn port1.Close();rn if (!port1.IsOpen)rn rn Console.WriteLine("the port is already closed");rn rnrn rnrn //向串口发送<em>数据</em>rn public void SendCommand(string CommandString)rn rn port1.Write(CommandString);rn //Console.WriteLine(port1.ReadExisting());rn textBox1.Text = port1.ReadExisting();rn rnrnrn private void button1_Click(object sender, EventArgs e)rn rn if (!port1.IsOpen)rn rn InitCOM("COM1");rn OpenPort();rn rn SendCommand("abcdefg");rn rnrn private void button2_Click(object sender, EventArgs e)rn rn port1.Close();rn rnrn private void Form1_Load(object sender, EventArgs e)rn rn port1.DataReceived += new SerialDataReceivedEventHandler(port1_DataReceived);// new SerialDataReceivedEventHandler(port_DataReceived);rnrn rn rn[/code]
雷达接工控机不到数据
1.4线雷达采用TCP方式,将<em>数据</em>发送出来,16线雷达采用抓包方式将<em>数据</em>发送出来。(正常情况下时这样的。) 2.对于工控机一个网口对应一个网卡,所以对网卡配置好静态ip后,不能乱插网口,否者会导致<em>读</em><em>不到</em>雷达<em>数据</em>。 3.另外<em>读</em>16线雷达时,可以直接接笔记本<em>读</em>取<em>数据</em>,在浏览器直接输入192.168.1.201,在此之后,可以设置雷达的ip,然后<em>读</em>取相应ip的<em>数据</em>。 4.多颗雷达接路由器上时,可以...
我的串口不到数据.net程序
public void Open() rn rn //Init_Comm();rn DCB dcbCommPort = new DCB();rn COMMTIMEOUTS ctoCommPort = new COMMTIMEOUTS(); rn rn rn // OPEN THE COMM PORT.rnrn rn hComm = CreateFile("COM1:",GENERIC_READ | GENERIC_WRITE,0, 0,OPEN_EXISTING,0,0);rn rn // IF THE PORT CANNOT BE OPENED, BAIL OUT.rn if(hComm == INVALID_HANDLE_VALUE) rn rn throw(new ApplicationException("Comm Port Can Not Be Opened"));rn rn rn // SET THE COMM TIMEOUTS.rn rn GetCommTimeouts(hComm,ref ctoCommPort);rn ctoCommPort.ReadTotalTimeoutConstant = ReadTimeout;rn ctoCommPort.ReadTotalTimeoutMultiplier = 0;rn ctoCommPort.WriteTotalTimeoutMultiplier = 0;rn ctoCommPort.WriteTotalTimeoutConstant = 0; rn SetCommTimeouts(hComm,ref ctoCommPort);rn rn // SET BAUD RATE, PARITY, WORD SIZE, AND STOP BITS.rn // THERE ARE OTHER WAYS OF DOING SETTING THESE BUT THIS IS THE EASIEST.rn // IF YOU WANT TO LATER ADD CODE FOR OTHER BAUD RATES, REMEMBERrn // THAT THE ARGUMENT FOR BuildCommDCB MUST BE A POINTER TO A STRING.rn // ALSO NOTE THAT BuildCommDCB() DEFAULTS TO NO HANDSHAKING.rn rn dcbCommPort.DCBlength = Marshal.SizeOf(dcbCommPort);rn GetCommState(hComm, ref dcbCommPort);rn dcbCommPort.BaudRate=BaudRate;rn dcbCommPort.Parity=Parity;rn dcbCommPort.ByteSize=ByteSize;rn dcbCommPort.StopBits=StopBits;rn SetCommState(hComm, ref dcbCommPort);rn rn Opened = true;rn rn rnpublic byte[] Read(int NumBytes) rn rn byte[] BufBytes;rn byte[] OutBytes;rn BufBytes = new byte[NumBytes];rn if (hComm!=INVALID_HANDLE_VALUE) rn rn OVERLAPPED ovlCommPort = new OVERLAPPED();rn int BytesRead=0;rn ReadFile(hComm,BufBytes,NumBytes,ref BytesRead,ref ovlCommPort);rn OutBytes = new byte[BytesRead];rn Array.Copy(BufBytes,0,OutBytes,0,BytesRead);rn rn else rn rn throw(new ApplicationException("Comm Port Not Open"));rn rn return OutBytes;rn rn 那位大哥能帮我看看那里有错误。
就是不到数据,什么原因呢?
这是命名为 note.xml 文件rnrnrnrn rn 001 rn Zhang lirn zhagenborn rn rn rn 002rn Xu Huarn Wei Jianfengrn rnrnrn这是命名为style.xsl 的样式表,可怎么都<em>读</em>不出来<em>数据</em>,只是能显示一行number name friedn ,什么问题rnrnrnrnrnrnrn The Schoolrnrn rn rn numberrn namern friendrn rnrn rn rn rn rn rn rnrnrnrnrnrn
Powerbuilder不到SQLSERVER的数据的类型?
求救:rn本人用SQLServer 2000为<em>数据</em>库,用powerbuilder6.5前台开发时Powerbuilder<em>读</em><em>不到</em><em>数据</em>的类型,what can I do? help!help! rn
奇怪的现象:串口不到数据
本人曾做过VB与串口的通信工程,对串口也算有一定的了解,可是这次遇到的问题比较特殊。rn现象如下:rn1、与测量仪器通信时,我的程序能传<em>数据</em>到仪器,但仪器返回的<em>数据</em>就是收<em>不到</em>;rn[color=#FF6600]2、奇怪的地方是:当发送指令后没接收到<em>数据</em>,在本程序中关闭串口后,用串口调试精灵打开该串口时,<em>数据</em>接收到了。[/color]rn3、用ser232Mon监视串口,发现本程序把<em>数据</em>送到缓冲区后,接收缓冲区无字符;rn4、用串口调试精灵发送相同指令,ser232Mon立即接收到返回<em>数据</em>;rnrn思考和试解决过程:rn1、既然通信仪器接发<em>数据</em>正常,排除线路、协议、本程序发送指令的问题;检查MSComm控件设置无问题;rn2、我开始以为是本程序发送指令后,仪器有硬件握手协议,致使仪器想要传送给PC,却认为PC未准备好,从而未传送,可是再想也不对:为什么串口精灵可以收到呢?rn3、除了串口调试精灵外,我下载了一些其它的串口调试工具,有的可以收到<em>数据</em>,有的也和我的程序一样收<em>不到</em><em>数据</em>;rnrn不知道哪位仁兄有好的思路或有过类似的经历,希望得到您的指导,谢谢!
数据库已经连上,却不到数据
[code=VB] t = Format(Now(), "yyyymmdd")rn tt = PATH1 & "\" & t & ".dbf"rn rn If Dir(tt, vbHidden) = "" Then '' 判断文件是否存在rn Label2.Caption = Now() & " 1#生产<em>数据</em>库连接失败!"rn Label2.ForeColor = vbRedrn Exit Subrn Elsern t = Format(Now(), "yyyymmdd")rn rn End Ifrn If (dbcon.State <> 1) Thenrn Set dbcon = New ADODB.Connectionrn str = "Provider=MSDASQL.1;Driver=Microsoft Visual Foxpro Driver;SourceDB=" & PATH1 & ";SourceType=DBF;"rn dbcon.CursorLocation = adUseClientrn On Error Resume Nextrn dbcon.Open str ''打开A楼<em>数据</em>库rn If dbcon.State <> 1 Thenrn Label2.Caption = Now() & " 1#生产<em>数据</em>库连接失败!"rn Label2.ForeColor = vbRedrn Exit Subrn Elsernrn Label2.Caption = Now() & " 1#生产<em>数据</em>库连接成功!"rn Label2.ForeColor = vbWhitern End Ifrn End Ifrn Set db_rs = New ADODB.Recordsetrn sql = "select * from " & tt & " order by SJ"rn db_rs.Open sql, dbcon, adOpenKeyset, adLockOptimisticrn If db_rs.RecordCount > 0 Thenrn db_rs.MoveFirstrn Do While Not db_rs.EOFrn pTime = Trim(db_rs.Fields("SJ"))rn GCMC = Trim(db_rs.Fields("GCMC"))rn If Trim(db_rs.Fields("GCBW")) <> "" Thenrn GCBW = Trim(db_rs.Fields("GCBW"))rn Elsern GCBW = ""rn End Ifrn rn db_rs.MoveNextrn Looprn [/code]rndb_rs.RecordCount > 0 这句提示<em>数据</em>提供程序或其他服务返回 E_FAIL 状态
Modbus TCP经常出现不到数据的问题
服务器是正常的,但Modbus TCP经常出现<em>读</em><em>不到</em><em>数据</em>的问题。rn麻烦大家看看这个类是不是有问题?rn另外哪位有稳定的Modbus TCP通讯类,提高一下,谢谢。rn谢谢。rnrnrn[code=java]package net.wimpi.modbus.facade;rnrnimport java.io.DataInputStream;rnimport java.io.DataOutputStream;rnimport java.io.IOException;rnimport java.io.InputStream;rnimport java.io.OutputStream;rnimport java.net.Socket;rnimport java.net.UnknownHostException;rnimport java.util.ArrayList;rnimport java.util.Date;rnimport java.util.List;rnrnpublic class ModbusConnect rn //instance attributesrn private Socket m_Socket;rn private int m_Timeout = ModbusTCPMaster.TIMEOUT;rn private boolean m_Connected;rn private DataInputStream m_Input = null; //input streamrn private DataOutputStream m_Output = null; //output streamrn private InputStream m_InputStream = null; //wrap into filter inputrn private OutputStream m_OutputStream = null; //wrap into filter outputrn rn rn /**rn * Constructs a TCPMasterConnection instancern * with a given destination address.rn *rn * @param adr the destination InetAddress.rn */rn public ModbusConnect() rn //constructorrnrn /**rn * Opens this TCPMasterConnection.rn *rn * @throws Exception if there is a network failure.rn */rn public void connect(String IP)rn throws Exception rn if(!m_Connected) rn tryrn m_Socket = new Socket(IP, 502);rn m_Socket.setSoTimeout(1000);rn new ModbusConnect().prepare();rn m_Connected = true;rn catch (Exception e) rn m_Connected = false;rn rn rn //connectrnrn /**rn * Closes this TCPMasterConnection.rn */rn public void close() rn if(m_Connected) rn try rn m_InputStream.close();rn m_OutputStream.close();rn m_Output.close();rn m_Input.close();rn m_Socket.close();rn catch (IOException ex) rn rn m_Connected = false;rn rn //closernrnrn /**rn * Returns the timeout for this TCPMasterConnection.rn *rn * @return the timeout as int.rn */rn public int getTimeout() rn return m_Timeout;rn //getTimeoutrnrn /**rn * Sets the timeout for this TCPMasterConnection.rn *rn * @param timeout the timeout as int.rn */rn public void setTimeout(int timeout) rn m_Timeout = timeout;rn try rn m_Socket.setSoTimeout(m_Timeout);rn catch (IOException ex) rn //handle?rn rn //setTimeoutrnrnrn /**rn * Tests if this TCPMasterConnection is connected.rn *rn * @return true if connected, false otherwise.rn */rn public boolean isConnected() rn return m_Connected;rn //isConnectedrnrn public Socket getM_Socket() rn return m_Socket;rn rnrn public void setM_Socket(Socket socket) rn m_Socket = socket;rn rn rn public void prepare() throws IOExceptionrn if(m_Socket != null)rn m_InputStream = m_Socket.getInputStream();rn m_OutputStream = m_Socket.getOutputStream();rn m_Output = new DataOutputStream(m_OutputStream); rn m_Input = new DataInputStream(m_InputStream );rn rn rn rn rn public List read(int unitvar,int startAddress,int length,int number) throws UnknownHostException, IOExceptionrn rn List list = new ArrayList();rn if(m_Output != null)rn synchronized (m_Output) rn rn int number1 = 0;rn int number2 = 0;rn if(number > 255 )rn number1 = number/256;rn number2 = number - (number1*256);rn elsern number2 = number;rn rn int startAddress1 = 0;rn int startAddress2 = 0;rn if(startAddress > 255 )rn startAddress1 = startAddress/256;rn startAddress2 = startAddress - (startAddress1*256);rn elsern startAddress2 = startAddress;rn rn byte[] b = new byte[12];rn b[0] = (byte)number1;rn b[1] = (byte)number2;rn rn b[2] = (byte)0;rn b[3] = (byte)0;rn rn b[4] = (byte)0;rn b[5] = (byte)6;rn rn b[6] = (byte)unitvar;rn b[7] = (byte)3;rn rn b[8] = (byte)startAddress1;rn b[9] = (byte)startAddress2;rn rn b[10] = (byte)0;rn b[11] = (byte)length;rnrn tryrn m_Output.write(b);rn catch (Exception e) rn // TODO: handle exceptionrn e.printStackTrace();rn close();rn rn m_Output.flush();rn int readBufferNumber = length*2 + 9;rn byte[] readBuffer = new byte[readBufferNumber]; rn rnrn int nIndex = 0; rn int nTotalLen = readBuffer.length; rn int nReadLen = 0; rnrn tryrn while (nIndex < nTotalLen) rn rn nReadLen = m_Input.read(readBuffer, nIndex, nTotalLen - nIndex); rnrn if (nReadLen > 0) rn rn nIndex = nIndex + nReadLen; rn rn else rn rn break; rn rn rnrn catch (Exception e) rn // TODO: handle exceptionrn Date date = new Date();rn java.sql.Date sqlDate = new java.sql.Date(date.getTime());rn java.sql.Time sqlTime = new java.sql.Time(date.getTime());rn String t = sqlDate.toString() + " " + sqlTime.toString();rnrn System.out.println("read error >>> Time:" + trn + " IP:" + m_Socket.getRemoteSocketAddress()rn + " unitvar:" + unitvarrn + " startAddress:" + startAddressrn + " length:" + lengthrn + " number:" + number);rn e.printStackTrace();rn close();rn rnrn rn for (int i = 9; i < readBuffer.length; i++) rn Integer var = Byte.valueOf(readBuffer[i]).intValue();rn if(var < 0) var = var + 256;rn list.add(var);rn rn rn rnrn rn rn return list;rn rnrnrn[/code]
javascript取xml文件,不到数据
我利用Ajax来进行翻页,在Servlet中从<em>数据</em>库获取<em>数据</em>,n <em>数据</em>写入out对象中,最后的<em>数据</em>格式为:n n      2004150201    张三    语文    89      n   n      2004150202    张三2    高等数学    89      n  n      2004150203    张三3    大学英语    89      n n  n 在js文件中,n var scoreInfo = XMLHttpReq.responseXML.getElementsByTagName("scoreInfo");n 这里 scoreInfo 应该是个数组吧,可我用 alert(scoreInfo.length);做测试时,弹出对话框值为0,n 这是???n 请大家帮助下,谢谢了!n  n  n  n  n   问题补充: 谢谢了,n 还需要获取树根吗,我试下.
InternetReadFileExA()返回TRUE,但是不到数据
WinInet异步。rnInternetReadFileExA(hRequest, &inetBuf, IRF_ASYNC, (DWORD_PTR)pHttp) 返回TRUE,但是inetBuf.dwBufferLength == 0,请问可能是什么原因?rn不会没有<em>数据</em>的,因为我改成同步后—— hInternet = InternetOpen(HTTP_AGENT_NAME_DEF, INTERNET_OPEN_TYPE_PROXY, param.szProxy, NULL, 0) ,inetBuf.dwBufferLength就有值了,而且<em>数据</em>正常。
android SharedPreferences 的问题,不到数据
[code=java] SharedPreferences share = getSharedPreferences("name", 0);rn Editor e = share.edit();rn rn //方法a,在第一句输出的时候<em>读</em><em>不到</em><em>数据</em>。rn String a = "abc_cc";rn System.err.println(share.getString(a, "默认结果"));//此句似乎没有执行,没有任何输出,错误...rn //但是第二次执行的时候,会正常输出。rn e.putString(a, "修改的结果");rn e.commit();rn System.err.println(share.getString(a, "默认结果"));//输出:修改的结果,正常rn rn //方法b,一切正常rn System.err.println(share.getString("abc_cc", "默认结果"));//输出:默认结果,正常rn e.putString("abc_cc", "修改的结果");rn e.commit();rn System.err.println(share.getString("abc_cc", "默认结果"));//输出:修改的结果,正常rn rn //求解,为什么方法a不行?[/code]rnrnrn这是getString的源码rn[code=java] String getString(String key, String defValue);rn rn /**rn * Retrieve a set of String values from the preferences.rn * rn * Note that you must not modify the set instance returnedrn * by this call. The consistency of the stored data is not guaranteedrn * if you do, nor is your ability to modify the instance at all.rn *rn * @param key The name of the preference to retrieve.rn * @param defValues Values to return if this preference does not exist.rn * rn * @return Returns the preference values if they exist, or defValues.rn * Throws ClassCastException if there is a preference with this namern * that is not a Set.rn * rn * @throws ClassCastExceptionrn */[/code]
串口不到数据 win ce6 模拟器
rn把PC得串口映射为WINCE6 模拟器的COM1口, 现在是可以打开但是<em>读</em><em>不到</em><em>数据</em>。rnrn模拟器可以操作串口吗?
Vs2005中GetPreloadedEntityBody()不到数据?
byte[] buffer = request.GetPreloadedEntityBody();rn次句意思是返回Http正文已经被<em>读</em>取部分;rn在2003下一切正常,结果到2005下总是返回null?rn此代码用于大文件上传Httpmodule类中.rn百分相赠解答正确者!rn
Sqlite 删查改
1、继承SqliteOpenHelper类public class MyOpenHelper extends <em>SQLite</em>OpenHelper { public static final String DB_NAME="student.db"; public MyOpenHelper(Context context) { super(context, DB_NAME,
利用Python3 sqlite数据
Python3 <em>读</em>sqlite<em>数据</em>库 sqlite3_reader.py 这个类主要是<em>读</em>取图层字段信息 import sqlite3 import re class Sqlite3FieldInfo: #目前无法确定sqlite3<em>数据</em>库字段长度的获取有没有问题 def __init__(self): self.__fieldName = '' ...
SQLite 二进制 参数问题
大家好!rn我写了一个用<em>SQLite</em>的二进制写入的函数:rn[code=C/C++]int WriteBlob(sqlite3 *pDB, sqlite3_stmt **ppStmt, char *TableName,char* ColName, void *pData, int ByteNum, int Flag)rnrn if (Flag==MLPREPARE)rn rn sqlite3_prepare(pDB,sqlite3_mprintf("insert into %s(%s) values(?);",TableName,ColName),-1,ppStmt,0);rn rn sqlite3_bind_blob(*ppStmt,1,pData,ByteNum,0);rn return sqlite3_step(*ppStmt);rn}[/code]rn这个函数当我把参数sqlite3_stmt **ppStmt变为sqlite3_stmt *ppStmt怎么就出错呢?rn为什么在函数调用的时候传入sqlite3_stmt *ppStmt型就不对呢?rn我感觉是因为sqlite3_prepare里用的是sqlite3_stmt **ppStmt 但是sqlite3_stmt *ppStmt为什么不行呢?rn希望解释!谢谢!
SQLite数据库,SQL语句含中文时查询不到
有一个省名的<em>数据</em>库,里面应该是放的GBK编码的中文省名<em>数据</em>。rnSQL语句中不含中文时,按下面的代码<em>读</em>到了中文地名:rnrn<em>SQLite</em>Database m<em>SQLite</em>Database=null;rnm<em>SQLite</em>Database=<em>SQLite</em>Database.openDatabase("mnt/sdcard/MyProject/placeName.db",null,<em>SQLite</em>Database.OPEN_READONLY);rnString sql="SELECT * FROM T_Province";rnCursor cur=m<em>SQLite</em>Database.rawQuery(sql,null);rnrn。。。。这样可以查询到信息rnrnrnString sql=[color=#FF0000]"SELECT * FROM T_Province where ID[/color];//这样就查询<em>不到</em>任何记录rnrn求教各位大神
bios不到usb启动盘
前段时间,一朋友让我把他的电脑重装一下系统。都是华硕的,我的就可以<em>读</em>出来,他的电脑就是<em>读</em>不出来usb启动盘。网上都说,应该设置bios就可以<em>读</em>到启动盘了,还有一个地方要注意。现在制作U盘启动盘有两种方式,如果是给笔记本重装系统建议下载UEFI版本的,因为新的机型只能使用UEFI版本制作的启动盘才能被bios<em>读</em>取到。
CS8900不到网口ID
ARM用的是freescale的i.mx27,网口用的是cs8900rn8900挂在mx27的一个片选上rn然后配置cs8900的时序,也就是配置mx27的片选控制器,片选控制器的模式有同步模式,异步模式,突发模式rn我配置的是异步模式(这个应该没错吧),再按照cs8900和mx27的datasheet配置时序,配了两天,感觉应该没配置错,但还是<em>读</em><em>不到</em>8900芯片IDrncs8900的地址也没错rn请问怎么解决?求指导
为什么不到正确的字符......???
服务器上安装的是英文版的WINDOWS NT、ORACLE8.0.1.5<em>数据</em>库rn客户端是中文WINDOWS :rn从WEB页面录入的汉字入库后,到库中看是乱码rn直接写入<em>数据</em>库的汉字,从WEB页<em>读</em>出来是乱码rn如果写入的是英文,则<em>读</em>出、写入都没有问题rnrn请问问题出在哪里?rn是ORACLE的字符集设置的不对(目前是America_American_zhs16gbk)?rn还是IIS在解析的时候出现了错误?rn应该如何解决呢?rn请各位指教!rn非常感谢!
服务器为什么不到参数
用C++写的一个客户端(SOAP Toolkit 3.0),向服务器发送了<em>数据</em>(用抓包工具抓到的):rn rn- rn- rn- rn SunWZ rn rn rn rn但服务器无法<em>读</em>到参数strNamern服务器代码(.net 2003 C#):rn[WebMethod]rnpublic string AddOrder(string strXml)rnrn if(strXml != "")rn return "ok";rn elsern return "false";rnrn从网页上测试副服务器是正确的.
为什么LoadImage不到BMP?
hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(),WND_PIC_BK_FILENAME,rn IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE);rnrn用LoadImage<em>读</em>BMP,<em>读</em>是<em>读</em>到了,但是:窗口中有很多地方要贴图用到hBmp,最后只有一个能贴出图片,这是为什么?
DexClassLoader不到jar文件求解!
我在第一个项目当中创建了一个com.example.interf包,里面有接口ILoader ,又写了一个方法JarLoader,并将两个文件打成了dex以后的jar包存到SD卡下unit_jar_path+jarName路径下n我又建了第二个项目将com.example.interf包以及下面的ILoader 接口的文件粘到新项目当中,又建了一个文件调用部分如下:nFile jarPath = new File(unit_jar_path+jarName);nFile dexOutputDir = context.getDir("dex", 0);nDexClassLoader cl = new DexClassLoader(jarPath.getAbsolutePath(), dexOutputDir.getAbsolutePath(), nnull, ClassLoader.getSystemClassLoader());nLog.e("test", "cl:"+ cl +"\n");nnClass className = cl.loadClass("com.example.interf.JarLoader");nLog.e("test", "className:"+ className +"\n");//这里有类名,找到了包下类名nnILoader loader = (ILoader)className.newInstance();nLog.e("test", "loader.sayHi():"+ loader.sayHi() +"\n");//这里没有执行并报错???nn现在能够找到包下类名,却找<em>不到</em>方法,打印不出Log.e("test", "loader.sayHi():"+ loader.sayHi() +"\n");这个日志,并且报njava.lang.ClassCastException: com.example.interf.JarLoader cannot be cast to com.example.impl.ILoader请问高手我哪里做的有问题?
为什么getInitParameter 不到parameter?
在servlet的init函数里rnString file = getInitParameter( "log4j-validate" );rnrnweb.xml是这样,rnrn ValidateServletrn ValidateServletrn ValidateServletrn rn log4j-validatern resources/validate.propertiesrn rn rnrnfile<em>读</em><em>不到</em>,是null,不过deploy到server上是可以的,在wsad里就不行,是不是我的哪里设置不对或没有做? 或者就是web.xml也没有<em>读</em>到? rn急,求教rn
C++ VIM 不到第三方库
.bashrc文件: export CPLUS_INCLUDE_PATH=CPLUS_INCLUDE_PATH:$MATLAB/extern/include .ycm_extra_conf.py: flags加入 ‘-isystem’, ‘/path/to/kaldi/src’
物理&逻辑&即时&一致&一致性
物理<em>读</em> 逻辑<em>读</em> 即时<em>读</em> 一致<em>读</em> <em>读</em>一致性 这几个概念很容易混淆,下面来深入讨论。 1. 物理<em>读</em>(physical reads) 什么叫计算机中的物理<em>读</em>? 如果我们需要的<em>数据</em>不在内存中,那么cpu要获取该<em>数据</em>就必须去磁盘上<em>读</em>取。此时必须要经过磁盘控制器的输入输出,这就叫物理I/O. 表现在ORACLE中,就是如果一个session查询一个表,此时这个表<em>数据</em>没有在内存中,那
为什么不到注册表呢?
<em>读</em>不了注册表,帮帮忙。rnrn.386rn.model flatrnrnextrn RegQueryValueExA:procrnextrn MessageBoxA:procrnextrn ExitProcess:procrnrn.datarnrnregKey db "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\魔兽世界\DisplayIcon",0rnrnpathfile db 256 dup (0)rnkeylen dd 256rndwtype dw 0rnrnrn.codernrnstart:rnrnmov eax, offset keylenrnpush eaxrnmov eax, offset pathfilernpush eaxrnmov eax, offset dwtypernpush eaxrnpush 0rnmov eax, offset regKeyrnpush eaxrnpush 80000002hrncall RegQueryValueExArntest eax,eaxrnjnz backrnrnrnpush 0rnmov eax, offset pathfilernpush eaxrnmov eax, offset pathfilernpush eaxrnpush 0rncall MessageBoxArnrnrnback:rnpush 0rncall ExitProcessrnrnend startrnrnrnRegQueryValueExA返回代码是02(找<em>不到</em>文件)rnrnSOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\魔兽世界\DisplayIcon这个键是存在的rn我试着<em>读</em>其它键也<em>读</em><em>不到</em>。rn为什么呢?rnrnrnrn我又用VC6再试了,也不行。然后我又用REGEDT32把那个键的安全选项加上ANYONE完全控制。也不行。rnrnrn char regkey[] = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\魔兽世界";rn long vlen = 256;rn char value[256]=0;rn HKEY hkey;rn RegOpenKey(HKEY_LOCAL_MACHINE, regkey, &hkey);rn RegQueryValue(hkey, "DisplayIcon", value, &vlen);rn rn MessageBox(NULL, value, "", MB_OK);rnrn return 0;rn
AfxGetMainWnd()不到主窗口
[color=#000000]rn[code=c]rnVOID CALLBACK CntIrq(int port) rnrn if(::AfxGetMainWnd()) rn rn if(::AfxGetMainWnd()->m_hWnd)rn rn ::PostMessage(::AfxGetMainWnd()->m_hWnd,WM_PCOMM,0,0); rn rn rnrn[/code]rn[/color]rn这个怎么解决?
JSP页面不到Map的值
从<em>数据</em>库调用了一个返回类型是map的函数,然后试图在jsp页面中以表格的形式呈现出来,然后。。似乎并没有成功地调到map,小白求问问题出在哪里[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/11.gif][/img]
ListBox1.SelectedValue不到值,郁闷了
ListItem li ;rn for (int i = 0; i < ds.Tables["student"].Rows.Count; i++)rn rn if (id.ToString() != ds.Tables["student"].Rows[i][0].ToString().Trim())rn rn if (ds.Tables["student"].Rows[i][2].ToString().Length < code.Length || ds.Tables["student"].Rows[i][2].ToString().Substring(0, code.Length) != code)rn rn li = new ListItem();rn li.Value = ds.Tables["student"].Rows[i][2].ToString();rn li.Text = getColumnListName(ds.Tables["student"].Rows[i][1].ToString(), ds.Tables["student"].Rows[i][2].ToString());rn ListBox1.Items.Add(li);rnrn rn rnrnrn但是ListBox1.SelectedValue<em>读</em><em>不到</em>值,郁闷了
串口不到数得问题
下面得程序是将键盘上得一个字符发送到串口,然后<em>读</em>数,但是发现<em>读</em><em>不到</em>任何<em>数据</em>,希望各位大侠帮忙!rn[code=C/C++]rn#include rn#include rnrn#define LSB 0rn#define MSB 1rnrn#define RXR 0rn#define TXR 0rn#define IER 1rn#define IIR 2rn#define LCR 3rn#define MCR 4rn#define LSR 5rn#define MSR 6rnrn#define Com1_base 0x3f8rn#define uchar unsigned charrnrnrnvolatile uchar inputData;rnvolatile uchar onInput = 0x00;rnvolatile uchar onOutput = 0x00;rnrnvoid interrupt (*OldVect)();rnvoid interrupt SerialISR();rnrnvoid InitCom()rnrn uchar inttemp;rn /*设置波特率什么的*/rn outportb(Com1_base+LCR,0x80);rn outportb(Com1_base+LSB,0x0c);rn outportb(Com1_base+MSB,0x00);rn outportb(Com1_base+LCR,0x03);rn outportb(Com1_base+IER,0x01);rn rn /*设置中断向量*/rn OldVect = getvect(0x0c);rn disable();rn inttemp = inportb(0x21)&0xef;rn outportb(0x21,inttemp);rn setvect(0x0c,SerialISR);rn enable();rnrnrnvoid CloseCom()rnrn disable();rn outportb(Com1_base+IER,0x00);rn outportb(Com1_base,0x00);rn outportb(0x21,inportb(0x21)|~(0xef)); rn setvect(0x0c,OldVect);rnrnrnvoid interrupt SerialISR()rnrn /*串口中断服务代码*/rn inputData = inportb(Com1_base+RXR);rn onInput = 0x01;rnrn /*服务代码结束*/rn outportb(0x20,0x20); /*中断结束的代码*/rnrnrnvoid SendChar(uchar key)rnrn while( ((inportb(Com1_base + LSR)) & 0x40) == 0);rn rn outportb(Com1_base + TXR,key);rn rn rnrnrnvoid main()rnrn uchar key;rn uchar bExit_flag = 0x00;rn InitCom();rn while(!bExit_flag)rn rn if(onInput == 0x01)rn rn printf("c:%c",inputData);rn printf("d:%d",inputData);rn printf("s:%s \n",inputData);rn onInput = 0x00;rn rn if(kbhit())rn rn switch(key = getch())rn rn case 0x1b:rn bExit_flag = 0x01;rn break;rn rn if(!bExit_flag)rn SendChar(key);rn rn rn CloseCom();rn printf("Bye~.\n");rnrnrnrn[/code]
为什么我不到cookie?
在根目录下的users目录里设置cookiernsetcookie("username",$Login_Uname,time()+86400*15);rnrn我在根目录里用echo $_COOKIE['username'];<em>读</em>不出来,为什么?在users目录里可以<em>读</em>到这个cookie
使用prototype不到XML?
rn代码如下:rnfunction getXml()rn var url = 'D:/retu/dragable/test';rn var pars = '';rn var myAjax = new Ajax.Request(rn url,rn method: 'get', onComplete: showresponsern );rn rn rn function showresponse(req)rn var Allnode=req.responseXML;rn var node = Allnode.getElementsByTagName("userId"); rn alert(node.length);rn rnrnXML文件如下:rnrn rn 123rn aaarn rn rn 456rn bbbrn rn rn 789rn cccrn rnrn结果node.length为0,最后发现node.responsText为空。rn不知道是哪里出了问题,请大家帮忙看看。谢谢~
Nand flash 不到ID
cpu是pxa270,Nand flash是K9F1208。rn#define NAND_BASE 0x07000000rn#define RdNFDat8() (*(volatile U8 *)NAND_BASE)rn#define RdNFDat() RdNFDat8()rn<em>读</em>取Nand flash的函数:rnstatic U32 ReadChipId(void)rnrn U32 id;rn rn NFChipEn(); rn WrNFCmd(RdIDCMD);rn WrNFAddr(0);rn while(NFIsBusy()); rn id = RdNFDat()<<8;rn id |= RdNFDat(); rn NFChipDs(); rn rn return id;rnrn最后的结果id <em>读</em>出来的值是0,怎么也想不明最后<em>读</em>出来的值是0,向大家请教。
文件上传不到文件问题
我要实现一个上传下载功能,我们把项目部署在linux服务器上,然后我们用户自己的电脑是windows的操作系统,然后想上传文件到10.8.2.6这台windows服务器上,现在的问题是我们只要把项目部署到linux系统正式环境跑的时候,FIil file = new File(localname);InputStream input = new FileInputStream(file);就获<em>不到</em>文件,不能写入流,我的localname是D:\test.xls.请问为什么部署到linux上后就获<em>不到</em>文件了呢?老是说文件不存在或是没有这个目录。
为什么不到Cookies的值??
if (this.txtname.Text == "" || this.txtmobile.Text == "")rn rn Response.Write(" ");rn Response.Write(" ");rn rn HttpCookie readcookie = System.Web.HttpContext.Current.Request.Cookies["Username"];rn HttpCookie readcookiemobile = System.Web.HttpContext.Current.Request.Cookies["Usermobile"];rn HttpCookie readcookieid = System.Web.HttpContext.Current.Request.Cookies["Userid"];rn if (!Object.Equals(readcookie, null) && !Object.Equals(readcookiemobile, null))rn rn //HttpCookie readcookie = Request.Cookies["Username"];rn //HttpCookie readcookiemobile = Request.Cookies["Usermobile"];rn //HttpCookie readcookieid = Request.Cookies["Userid"];rn string name = this.txtname.Text.Trim();rn string mobile = this.txtmobile.Text.Trim();rn if ((name == readcookie.Value) && (mobile == readcookiemobile.Value))rn rn Session["id"] = readcookieid.Value;rn Session["name"] = readcookie.Value;rn Session.Timeout = 24 * 60;rn Response.Write(" ");rn rn elsern rn Response.Write(" ");rn Response.Write(" ");rn rn rn elsern rn Response.Write(" ");rn rnrn这样的代码没有错吧,怎么取<em>不到</em>Cookies的值,在本地是好的,在服务器上就是<em>读</em><em>不到</em>值,难道是Username是中文的有关???
smslib 不到端口问题
javax.comm.properties 已经放在%JAVA_HOME%/jre/lib 下rn win32com.dll 已经放在%JAVA_HOME%/jre/bin 下rn comm.jar 已经放在%JAVA_HOME%/jre/lib/ext 下rnrn 在eclipse开发环境中运行可以<em>读</em>出端口,但将项目export为jar 包后独立运行就<em>读</em>不出。 rn rn 请问这是什么原因。
不到cookie啊,晕
写:rnCookie cookie=new Cookie("userinfo", userinfo);rncookie.setMaxAge(30*24*60*60);rncookie.setPath("/");rnhttpServletResponse.addCookie(cookie);rnrn<em>读</em>:rn Cookie[] cookie = request.getCookies();rn for (int i = 0; i < cookie.length; i++) rn Cookie myCookie = cookie[i];rn if (myCookie.getName().equals("userinfo")) //length=2,但是找<em>不到</em>userinforn .............
为什么不到xml节点?
#import rn using namespace MSXML2; rnrnrn IXMLDOMDocumentPtr pXMLDoc; rn IXMLDOMElementPtr pXMLRoot; rn //create DomDocument object rn CoInitialize(NULL);rn HRESULT hr = pXMLDoc.CreateInstance(__uuidof(MSXML2::DOMDocument30)); rn if( !SUCCEEDED(hr) ) rn ::AfxMessageBox("error");rn return ;rn rnrn hr = pXMLDoc->loadXML("D:\\Program Files\\Microsoft Visual Studio\\MyProjects\\TESTSDAPIEX\\sdapischema.xml");rn if (!SUCCEEDED(hr) )rn rn ::AfxMessageBox("error");rn return;rn rn rn pXMLRoot = pXMLDoc->documentElement; //就在这,pXMLRoot总是为Null.为什么呢?rnrn if (pXMLRoot==NULL) rn ::AfxMessageBox("error");rn rnrn编译都没有问题。
怎么不到内容呢?
rnrnrnWarning: filesize() [function.filesize]: stat failed for http://www.baidu.com/index.html in E:\PHP\htdocs\TMPdwfddmzh8w.php on line 3rnrnWarning: fread() [function.fread]: Length parameter must be greater than 0 in E:\PHP\htdocs\TMPdwfddmzh8w.php on line 3rn
数据不到第一条记录
$i;rn$j;rnrnfor($j=0;list($id,$code,$name)=mssql_fetch_row($rs);$j++)rn rn$rs_id[$j]=$id; rn$rs_code[$j]=$code; rn$rs_name[$j]=$name; rnrnrn$strResult= " 序号 编码 名称 "; rnrnfor ($i=0;$i ; rn rnecho $strResult; rnrn结果显示10条<em>数据</em>,但第一条记录为空,只能从第2条开始显示,i和j改了好几次也没用rn试过了第一条记录<em>数据</em>格式没问题
memo1为什么不到Stream?
代码如下:rnrnvar mstr:TMemoryStream;rnbeginrn mstr:=TMemoryStream.Create;rn mstr:=getkqinfo;rnrn memo1.Lines.LoadFromStream(mstr);rnend; rnrnfunction getkqinfo:TMemoryStream;rnvar mstr:TMemoryStream;rnbeginrn mstr:=TMemorySTream.Create;rn with Adoqry2 dorn beginrn Active := True;rn if not IsEmpty thenrn beginrn TBlobField(FieldByName('kqinfo')).SaveToStream(mstr);rn end;rn end;rn result := mstr;rnend;rnrn请大家帮忙看下,为什么memo1取<em>不到</em>数,我测试了的,返回来的mstr size大小超过20000。
SQL数据不完整问题
Code:rnrnbt=(_bstr_t)"select * from CRM..Customer_Information";rnhr=rs->Open (bt,cn.GetInterfacePtr (),adOpenDynamic,adLockOptimistic,adCmdText);rn...rnwhile(!rs->EndOfFile)rnrnpcustinfo->m_infolist.InsertItem(0, "");rnstr=(char*)(_bstr_t)rs->Fields->GetItem("Customer_ID")->Value;rnpcustinfo->m_infolist.SetItemText(0,1,str);rnstr=(char*)(_bstr_t)rs->Fields->GetItem("Customer_Name")->Value;rnpcustinfo->m_infolist.SetItemText(0,0,str);rnrs->MoveNext();rnstr.Empty();rnrnrn模拟<em>数据</em>: Customer_InformationrnCustomer_ID Customer_Namern001 Lilyrn002 Lucyrn003 (NULL) rn004 Jimrn005 Kenrnrn如果按照逻辑的话,rn五条记录将被<em>读</em>取出来,rn但当有记录的其中一个字段为NULL时,rn就不再继续<em>读</em><em>数据</em>.rn也就是只是两条记录被<em>读</em>取.rn这是什么原因呢?rn请大家帮下忙.rnrn环境:rnVC++ 6.0, SQL server Personal Edition.
面向对象程序设计与 Visual C++6.0教程下载
《面向对象程序设计》是计算机专业必修的基础课程,也是一门核心课程。本课程以C++语言为平台,在介绍面向对象的程序设计的思想和方法的同时,着重开展对学生的编程技能的训练。培养学生利用计算机程序解决实际问题的意识、思路和能力,为后续课程和计算机在各领域中的应用打下基础。 相关下载链接:[url=//download.csdn.net/download/lijiangyan123456/2873875?utm_source=bbsseo]//download.csdn.net/download/lijiangyan123456/2873875?utm_source=bbsseo[/url]
长度、重量单位转换工具源码下载
长度、重量单位转换工具源码,Access数据库,带换肤功能;PowerBuilder12.0 相关下载链接:[url=//download.csdn.net/download/heka2010/3571352?utm_source=bbsseo]//download.csdn.net/download/heka2010/3571352?utm_source=bbsseo[/url]
远距离RFID读卡器设计下载
远距离RFID读卡器设计 相关下载链接:[url=//download.csdn.net/download/shootsman/5326301?utm_source=bbsseo]//download.csdn.net/download/shootsman/5326301?utm_source=bbsseo[/url]
相关热词 c#部署端口监听项目、 c#接口中的属性使用方法 c# 昨天 c#func链接匿名方法 c#怎么创建文件夹 c#从键盘接收空格 c#da/ad c#部门请假管理系统 c#服务器socket c# 默认的访问修饰符
我们是很有底线的