|
|
hi,i am David Lau.
now i am doing a windows forms application. Yesterday, the customer gave us the following error. this error can repeat on that pc, but we do not repeat it in our test machine.
why does this error happens? who can help me?
■env:
・Win2000 SP4
・.net framework 1.1
・DB-Microsoft Access 2000
・VB.NET 2003
■Error infomation:
2007-04-13 16:45:02,476 System.Data.OleDb.OleDbException: Unknown
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at MIGRATE.ADP.RunSqlFillDataTbl(String strSql, DataTable& dtTbl)
--- ------- ---
at MIGRATE.ADP.RunSqlFillDataTbl(String strSql, DataTable& dtTbl)
at MIGRATE.frmMigrate.sbInitComboBox()
at MIGRATE.frmMigrate.frmMigrate_Load(Object sender, EventArgs e)
■Comment
(1)on that PC, MS Access is not installed
(2)MADC 2.8 has been installed.
Thanks.
David Lau
stillicel@hotmail.com
-- modified at 1:55 Monday 16th April, 2007
|
|
|
|
|
just update ur clients windows 2000 w/ sp4 or the latest sp release of microsoft.......
start a new beginning in every ending; thats what life for......
|
|
|
|
|
It looks like you trying to execute a Command against the database, but it's failing for an unknown reason. There's probably a couple dozen possibilities for this failure, but without any further information about what going on in the code at the time or what the SQL command is that it's trying to execute, it's just about impossible for anyone to tell you anything helpful.
Access does NOT have to be installed for this to work. You only need the MDAC.
Has the database been compacted and repaired recently?
Is the customer running more than one copy of the application at the same time?
Is the database local to the machine with the problem or is it shared on a network drive?
Does it have a password?
What's the command that's failing?
???
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak:
Thank you for your answer. today i will confirm the MDB file from the customer.
(1)>What's the command that's failing?
the following is the failing SQL:
SELECT ORIGIN_PE_CD,
ORIGIN_PC_CD,
ORIGIN_PC_SH_CD,
ORIGIN_PC_ALSNAME,
ORIGIN_PC_ADDRESS,
ORIGIN_PC_CHFNAME,
BAN34,
BAN35,
DEL_FLG
FROM K_T_PC_INFO
(2)>Does it have a password?
yes. the mdb file has a password. i have seen the log file, connection to that mdb file was successfully built. when excuting any SQL, that error happened.
(3)> Is the database local to the machine with the problem or is it shared on a network drive?
no. the log file tells that MDB file is in the c:\program files\kapp
|
|
|
|
|
Hi
Can anyone tell me if there is a method of loading an ADO persisted recordset XML file (VB6) into a .NET datatable, without installing ADODB in the project?
David Loring
!! Keep Music Live !!
|
|
|
|
|
DA_Loring wrote: without installing ADODB in the project?
Which project? The VB6 one that writes the XML file or the VB.NET one that loads it? Or do I have that backwards?
The only other way would be to load the document into an XmlDocument object and parse it manually.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi Dave
The VB6 project writes the file and the .NET project loads it. I did find .ReadXML but the project is not in a state to run this yet. Would .ReadXML understand the VB6 recordset schema?
The code I was thinking to use is
dTable.ReadXml(shareParams.OperationalShare & "\" & shareParams.GeneralInputFolder & "\" & dtRow("DataFileName"))
Where dTable is a DataTable and the parameter is the file name.
David Loring
!! Keep Music Live !!
|
|
|
|
|
XML is a standardized format, having nothing to do with VB6. ADO will still use the same data types.
And yes, you'd probably use DataSet.ReadXml to load the data.
It's easy enough to test. Should take you about 20 minutes to wipe together two small apps to test the data export to XML and read it again in VB.NET.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks very much for your help Dave.
David Loring
!! Keep Music Live !!
|
|
|
|
|
Is there a way to initialise a control in a control variable from a text string of the controls name i.e.
dim ctl as control
dim sControlName as string = "myTextBox"
...
ctl.name = sControlName
The control could be a picturebox, textbox, or label.
using vb.net 2003.
At the moment I search through controls on the form until I get a match, it's a bit slow.
I'm doing this with a plastic card design/print program. I save the position of each control into a text file then I open it and read the x and y to position each control
Thanks,
Bruce
Don't forget to brush |||_____
|
|
|
|
|
for each ctl as control in me.controls<br />
if ctl.name = sControlName then<br />
'do actions<br />
end if<br />
next
This is probbaly the fastest way to do it.
Posted by The ANZAC
|
|
|
|
|
Thanks, that's what I'm doing. Just thought.....
Bruce
Don't forget to brush |||_____
|
|
|
|
|
If you have the strings and you want to find the controls, you could build a dictionary that maps names to controls.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You've got me there. I haven't a clue how to do a dictionary.
Bruce
Don't forget to brush |||_____
|
|
|
|
|
I have no idea of the VB sytnax, but a dictionary is an associative container, so you'll end up able to do this
Dim c as Control = myDictionary("MycontrolName")
It's something like
Dim dic as Dictionary(String, Control)
It's a generic container.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for that.
The dictionary did sort a few things out and run faster.
It would be better if you didn't have to loop through to find what you need.
Bruce
Don't forget to brush |||_____
|
|
|
|
|
i add control to cells but as default it locate in Top Left and i can't change it's position to center auomaticaly.
-- modified at 16:12 Sunday 15th April, 2007
|
|
|
|
|
I don't think you can have it centered on the TableLayoutPanel.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
How to random and get Data from Dataset
|
|
|
|
|
Two questions or just a bit involved one?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
How to google, and ask clear questions ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
The best way to do this, is randomise it at the source. The other way to do it, is to randomly remove rows from your data. Where does the data come from ? Can you explain using more than four words ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
I am doing one application about some kind of information and i need to display last 4 files in file menu, I mean when user ckick file so it should display last 4 files name in file menu,So i have no idea where to start
any help
wating for your kind help
|
|
|
|