|
Hi all
I have been building the project in chapter 7 of this book and have hit a couple of problems at the end. Has anyone else used this example and hit any problems (ie in the book's coding)?
I am quite new to vb.net so am not really able to decipher every line.
The 2 errors are an error 9 and an error 21. The first is about a column being null (although all fields in the database have an entry). The second is to do with system.data and col1 and col2.
The computer I am working on is at home so I cant remember the exact wording so shall write it down later.
Any help based on the above info would be appreciated.
Thanks in advance
|
|
|
|
|
saff_cossie wrote:
The first is about a column being null (although all fields in the database have an entry).
Quite possibly, the query is returning nothing and your not checking to see if it actually returned any data before you tried to use it.
saff_cossie wrote:
The second is to do with system.data and col1 and col2.
Meaningless without seeing the code...
Since not everyone has this book, you'll have to post the code that your having problems with so we can see what's going wrong, along with the EXACT error messages, not the numbers, and what lines they're happening on.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the reply
Here is some more information. After going through my code last night, the error messages I am getting are based on a coded error message I have been instructed to write by the book.
1st Error
Error number: 5 'column' argument cannot be null. Parameter name: Column Source: System.Data
2nd Error
Error number: 91 object reference not set to an instance of an object. Source: MainApp
--
Any help appreciated.
Thanks
|
|
|
|
|
And the code? WIthout that, there's nothing we can do to help you. Not everyone has that book...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi! is there anyone up there who knows how to convert a powerpoint document to word document? Pls. email me at "nahtanoj_oric@yahoo.com". thanx
jonathan
|
|
|
|
|
I've seen commercial versions of this software, but nothing open source or public. SoftInterface has a good one...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi i got this question
is it ok if put all of these variables in the
mustInherit class ?
e.g:
Public MustInherit Class CTwoD_Shape
Inherits CShape
'TODO Include internal data members
Public mX, mY, mZ As Integer
Public Sub New()
X = 0
Y = 0
Console.WriteLine("CTwoD_Shape constructor : {0}", Me)
End Sub
Public Sub New(ByVal intX As Integer, ByVal intY As Integer)
X = intX
Y = intY
Console.WriteLine("CTwoD_Shape constructor : {0}", Me)
End Sub
Protected Overrides Sub finalize()
Console.WriteLine("CTwoD_Shape finalizer : {0}", Me)
MyBase.Finalize()
End Sub 'TODO Add a Finalizer
Public Property X() As Integer
Get
Return mX
End Get
Set(ByVal xValue As Integer)
mX = xValue
End Set
End Property
Public Property Y() As Integer
Get
Return mY
End Get
Set(ByVal yValue As Integer)
mY = yValue
End Set
End Property
Public Overrides Function Area() As Double
Return Math.PI * mZ ^ 2
End Function 'TODO Include Function Area
Public Overrides Function ToString() As String
Return "[X : " & mX & ", Y : " & mY & "]"
End Function
End Class 'CTwoD_Shape
|
|
|
|
|
Yes. Now, what's the real problem your having?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I made an inventory program and it runs fine on my computer but I cant get it to run on any other computer. I had to copy the msdaoc and msdatagrid files to the other computer just to make it run but the datagrid is blank. HELP!!!
|
|
|
|
|
How do you deploy your application to the other computer. Try to use install shield to package your application and other related file. In my opinion, your application won't run properly if you don't make the other computer to meet the same requirement like your computer during you design your application. Install Shield will collect all of necessary information, reference and component that you use during the time that you design your application and deploy it on the other computer. Try it first and hope you will success on the next time
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
It would appear that one of the programs requirements is the installation of MDAC 2.7 or better. Check it out here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
that did not solve the problem...
|
|
|
|
|
My mistake, the Jet database engine that access uses last appeared in the 2.6 version of MDAC, not 2.7.
Does the tartget machine have Office on it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I've done some work using an access databse and VB.net. You need to have the .NET Framework and the JET Drivers installed on the machine. That's all I needed. That's assuming it's a very basic & simple app. The .NET Framework is available at www.windowsupdate.com. As for the Jet Drivers needed for Access. Look here http://support.microsoft.com/default.aspx?kbid=829558
Hope that helps you !
|
|
|
|
|
You might want to tell the original poster this stuff. I don't need it because I don't do any of myu work in Access/Jet anymore.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for sharing that with us Dave !
|
|
|
|
|
I've done some work using an access databse and VB.net. You need to have the .NET Framework and the JET Drivers installed on the machine. That's all I needed. That's assuming it's a very basic & simple app. The .NET Framework is available at www.windowsupdate.com. As for the Jet Drivers needed for Access. Look here http://support.microsoft.com/default.aspx?kbid=829558Hope that helps you !
|
|
|
|
|
Hi, I am a beginner in .NET programming, and I need build an app, which allows me to click on any place on the screen - I heard about API function SetCursorPos during my VB6 programming in the past, but I don't remember the string which declares this function and I don't know if it is still possible to do it by this way. The second problem - how can I click on this place, specified by SetCursorPos function, now I haven't a clue how to do it. Please help. Thanks.
|
|
|
|
|
Anonymous wrote:
need build an app, which allows me to click on any place on the screen
You should be able to click any place on the screen without an app.
Aaron Eldreth
TheCollective4.com
My Articles
I hereby boycott this poll. Really....
- Leppie
|
|
|
|
|
Thanks, but I would need to build an app to do it automaticaly... (something like macros etc...
|
|
|
|
|
Hi All,
How is scope controlled with DataTables ?
I have a pocketpc project that has 4 forms
The first form provides a listbox bound to a datatable that allows the user to choose which record they want to work with
The other 3 forms allow them to manipulate data in that record of the datatable. I have bound the listbox like so:
' Create a new dataset.
myDataSetDS = New DataSet
' Set the Locale for the DataSet,
' using current culture as the default.
myDataSetDS.Locale = CultureInfo.CurrentCulture
' Set file names and create file streams.
' The XSD, XML, and EXE must be in the same directory.
xmlFileName = "\program files\mis\units.xml"
xsdFileName = "\program files\mis\units.xsd"
Dim FsXML As New FileStream(xmlFileName, FileMode.Open)
Dim FsXSD As New FileStream(xsdFileName, FileMode.Open)
' Load the schema into the DataSet.
Dim xtrXSD As New XmlTextReader(FsXSD)
myDataSetDS.ReadXmlSchema(xtrXSD)
xtrXSD.Close()
FsXSD.Close()
' Load the data into the DataSet.
Dim xtrXML As New XmlTextReader(FsXML)
myDataSetDS.ReadXml(xtrXML)
xtrXML.Close()
FsXML.Close()
unitsDt = myDataSetDS.Tables("x_Units")
'Bind the list box to the unit names.
lboUnits.DataSource = unitsDt
lboUnits.DisplayMember = "unit"
lboUnits.ValueMember = "id"
now on form2 if I have a textbox bound to the same datatable
changing from one row to another in the listbox does not update the textbox on the second form ? Is the textbox bound to a 2nd copy of the datatable ? How to properly scope the datatable to have the row change update the new record values in the rest of the project ?
Thanks
Gregory O. Foote
Software At Work, Inc.
Pensacola, Fl
|
|
|
|
|
THe scope is no different from any other variable you declare. Once the function that declared the variable finished it's execution, is falls out of scope. Your not binding to a copy of the same datatable, but it all depends on how your getting your information to and calling up form2. Without seeing any code, it's impossible to tell you whats going on.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi !
I am writing a software in Visual Basic 6.0, and i want the user to select from a list of all the registered ActiveX controls in Windows, and then add & use this control in my software at runtime.
How can this be done ?
For example, when a user enters "c:\windows\system\MyControl.OCX" in a textbox and presses "SAVE" button, this path is saved in a Access Database table. Next time when this software is run, it reads this path from the database at start up time, loads the control pointed to by the path and displays the GUI interface of this control on the Form.
|
|
|
|
|
I know this is a very basic level question. But how can I connect to a MySQL Database and pass queries to and from the database. Help !
Thanks
|
|
|
|
|
You should tell us that which interface that you will use. If you want to connect to the web using PHP, then you should read from here[^]
Hope that help
Roath Kanel
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|