|
I am using vb.net 2003 in my Project with MySQL 4.1 as backend in the .Net Framework 1.1.
Now I want use MySQLDirect .NET 5.1 as an provider in the same project with the
same requirement ( Vb.net 2003 as front end,MySQL 4.1 As Backend, .Net FrameWork 1.1 ).
Is it possible to use MySQLDirect .NET 5.1 in .NET framework 1.1 or not ?
|
|
|
|
|
We're not the people to ask this question of. You should be asking the people who wrote the MySQLDirect library, here[^]. But, on their homepage, it look like it works with all versions of the .NET Framework.
|
|
|
|
|
Dear Friends,
When loading set of data into combo box i have facing the problem .
"381 Invalid property array index"
record is above 33 thousands
here is the coding
If Not (objResultset.EOF And objResultset.BOF) Then<br />
objResultset.MoveFirst<br />
Do While Not objResultset.EOF<br />
<br />
cboPatient.AddItem objResultset("pid") & "|" & objResultset("name_first")<br />
cboPatient.ItemData(cboPatient.NewIndex) = objResultset("pid") 'problem occurs here<br />
<br />
objResultset.MoveNext<br />
Loop<br />
<br />
cboPatient.ListIndex = -1<br />
End If
any can able to help me its very urgent please
thanks in advance
give solution and samples
regards
kankeyan
|
|
|
|
|
33000 items? who is going to read or browse these??
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
THIS IS RELATED TO BILL ENTRY, SELECTION OF PATIENT NAME AND ID
|
|
|
|
|
you can't expect users to select from a huge collection in one step.
instead use two or three steps, e.g. let them choose or enter the first (or first few)
characters, show the results and let them then pick one from those results.
that is how all systems do it; even here at the CP forums, you get 25 or so at a time,
either from the entire collection (see this forum) or from a subset (when you perform
a find).
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi All,
I'm teaching myself as I go as we can't afford to outsource a few "simple" requirements to a real programmer. I'm running a form which has 5 rows (Monday to Friday) when the user clicks submit it checks if data has been entered on a row, if it has it looks in the db to see if there is already data and then chooses insert or update.
This works fine for the first row and then times-out on the second row while checking if there is data. The query runs fine in query analyzer.
I call the select that looks for existence of data as a function with
sqlCheckResponse = flexi_actions.CheckInsUpd(userID, txtDate2.Text)
and....
Function CheckInsUpd(ByVal userID As Integer, ByVal inputDate As String) As Integer
Try
Dim sqlCheckConn As New SqlConnection(strConn)
Dim strcheckSQL As String = "select count(detailID) from flexiDetail where userID = @uID and flexiDate = @fDate"
sqlCheckConn.Open()
Dim checkCmd1 As New SqlCommand(strcheckSQL, sqlCheckConn)
checkCmd1.Parameters.AddWithValue("@uID", userID)
checkCmd1.Parameters.AddWithValue("@fDate", inputDate)
CheckInsUpd = checkCmd1.ExecuteScalar 'timesout on this line...
sqlCheckConn.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Function
Any help appreciated!
Thanks
Paul
|
|
|
|
|
First, are the dates stored in your database using DateTime types or strings?? If strings, you're in trouble...
Second, pass dates in your code AS Date objects, not strings. AddWithValue is probably the worst method you could use to add a paramter to an SQL query. It infers what the proper date type might be by looking at the type of the value your passing it. In your case, you passed the inputDate as a string to the AddWithValue parameter, which probably added the parameter to the SQL statement as an nvarchar(x) , not an SQL DateTime. This might be where your SQL is hanging up.
How long does this query take to run in Query Analyzer?
|
|
|
|
|
If you are getting a Timeout Error, do the Following
checkCmd1.CommandTimeout = 0
This will allow your command object to run until the job is done.
Hope it Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hai friends
i want to add few images(pictureboxes) to the TableLoutPanel control at run time.
in the direction ...
like this..
--------->
1 2 3 4 ...
this the direction and the number 1,2,3,4.. are the labels indicationg the index of the images/picture boxes.
i m new to this control ....
plz help me
thanks in advance
vijay
|
|
|
|
|
You may use TableLayoutPanel1.Controls.Add method to add controls in a cell of control.
Number of rows and columns can be controled using RowCount and ColumnCount property.
Followign code will show you 4 cells with 4 pictureboxes in it –
---------------------------------------------------
Me.TableLayoutPanel1.RowCount = 1
Me.TableLayoutPanel1.ColumnCount = 4
Me.TableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.InsetDouble
Dim colno, rowno As Integer
colno = 0
rowno = 0
For i As Integer = 0 To 3
Dim picBox As New PictureBox()
picBox.BackColor = Color.Yellow
Me.TableLayoutPanel1.Controls.Add(picBox, colno, rowno)
colno += 1
Next
-------------------------------------------------
I hope this helps.
-Ajay.
-------------------------
www.componentone.com
-------------------------
|
|
|
|
|
|
Do you get any error messages?? "It won't run" doesn't give us anything to go on...
As speculation... Did you copy EVERYTHING from the Release fodler of your app to the other machine, or just the .EXE??
|
|
|
|
|
Sorry. No error messages, just no go. Nothing happens at all. The other machine is using the 'built' release version which you install with an installer. He has the very latest version.
Also, if I unregister the DLL, I can break it on my machine.
|
|
|
|
|
hi
i want to create a security policy setup and to deploy that setup on my client machines via domain so that i could run dotnet application from my lan without any security exception.
but i am unable to create any setup like that ,please help , any link or helping stuff ,,
thanks in advance
hello
|
|
|
|
|
|
I added a student to the database when in debug mode, but when I exit out of debug mode and then go back into debug mode the new student record is not there.
Do you know why? Do I need to commit the changes to the database? I am using acceptChanges.
I also add lesson information for the student. When I try to add the lesson information it doesn't even add to the database. Why does the student add but not the lesson?
When I used a message box to display the lesson info it displayed.
Here is my code to add the student.
addRow = lpDataSet.tbl_students.Newtbl_studentsRow()
addRow("stud_name") = txtStudentName.Text
addRow("stud_par_name") = txtParentName.Text
addRow("stud_add") = txtStudAdd.Text
addRow("stud_unit_num") = txtAptNum.Text
addRow("stud_city") = txtCity.Text
addRow("stud_state") = txtState.Text
addRow("stud_zip") = Convert.ToInt32(txtZip.Text)
addRow("stud_email") = txtEmail.Text
addRow("stud_cell") = txtStudCell.Text
addRow("stud_phone") = txtStudPhone.Text
addRow("stud_status") = intStudStat
lpDataSet.tbl_students.Rows.Add(addRow)
studTableAdapter.Update(addRow)
lpDataSet.Tables("tbl_students").AcceptChanges()
Here is the code to add the lesson.
addRow = lpDataSet.tbl_lessons.Newtbl_lessonsRow()
addRow("less_instrument") = txtInstrument.Text
addRow("stud_id") = Convert.ToInt32(cboSelectStudent.SelectedValue)
addRow("less_start_date") = Convert.ToDateTime(dtpStartDate.Text)
addRow("less_end_date") = Convert.ToDateTime(dtpEndDate.Text)
addRow("less_time") = Convert.ToDateTime(lvwItem.SubItems(1).Text)
addRow("less_day") = intDay
addRow("teach_id") = Convert.ToInt32(cboSelectTeacher.SelectedValue)
addRow("less_status") = intLessStat
lpDataSet.tbl_lessons.Rows.Add(addRow)
lessonTableAdapter.Update(addRow)
lpDataSet.Tables("tbl_lessons").AcceptChanges()
|
|
|
|
|
You're using an Access database as the datastore, correct?
In your project, under the Solution Explorer, you should find your .MDB file somewhere. Click on it and, in the Properties window, you should find an option called "Copy to Output Directory". If this is set to "Copy always", Visual Studio is copying your test database to the Debug or Release folder every time you run your app. This copy is what your code is modifying. The next time you to run your app, the original database file you created is copied to the Debug or Release folder again, overwriting anny changes your code made during the previous run.
|
|
|
|
|
I have a list view and when the user selects an item in the list view there is a combo box that has a list of teacher names in it. I am trying to pre select a teacher name when the user click on the item in the list view, but the teacher name is not changing when the user clicks on the item in the list view. I hard coded a selectedValue which is the teacher id to see if the teacher name would change in the combo box and it did.
Here is my code. Why is this happening?
Private Sub lvwSelectLess_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles lvwSelectLess.MouseDown
grpBxLessonInfo.Visible = True
Dim dt As New DataTable()
Dim lvwItems As New ListViewItem()
Dim selection As ListViewItem = lvwSelectLess.GetItemAt(e.X, e.Y)
If (selection IsNot Nothing) Then
MsgBox(selection.SubItems(4).Text)
cboSelectTeacher.SelectedItem = selection.SubItems(4).Text ' this si the line of code to set a pre selected item in the combo box.
txtInstrument.Text = selection.SubItems(3).Text
lblStartDate.Text = selection.SubItems(5).Text
dtpEndDate.Text = selection.SubItems(6).Text
End If
End Sub
|
|
|
|
|
AAGTHosting wrote: cboSelectTeacher.SelectedItem = selection.SubItems(4).Text ' this si the line of code to set a pre selected item in the combo box.
By setting the Text property of the ComboBox, you're not actually selecting anything. All you're doing is putting text in a TextBox control. To select the item, you have to call the FindString method of the ComboBox to find the text of the item you're looking for. This will return the index of the first item that matches that string. It'll return -1 if the item is not found. Then you can set the SelectedIndex property of the ComboBox to select the item.
|
|
|
|
|
I am trying to modify an XML node, such as the following example:
<url>http://www.codeproject.com
I have created a System.Xml.Xmldocument, and traversed the file using Xml.Xmlnodelist, Xml.Xmlelement and Xml.Xmlnode and want to replace some text.
I do this by using the InnerText property of the XmlNode and then call the following method:
XmlDocument.WriteTo(XMLTextWriter)
...where XMLTextWriter is the same file opened with the XMLDocument, which throws a file in use error.
Is there any way that I can modify the XMLDocument whilst it is still loaded in memory?
Matt
|
|
|
|
|
Have you tried the Save method of the XmlDocument class??
|
|
|
|
|
Using XmlDocument.Save throws the same error - file is in use by another process
|
|
|
|
|
What does the code look like that's loading the XML document?? Save and WriteTo both work on a document that's been loaded by XmlDocument.LoadXml, so this has to be caused by some other reader or permissions issue.
|
|
|
|
|
Right now, the code is:
Dim CurDir As String = Environment.CurrentDirectory() & "\globalConfig.xml"
Try
Dim sr As New System.IO.StreamReader(CurDir)
Dim globalConfig As Xml.XmlDocument = New Xml.XmlDocument()
globalConfig.Load(CurDir)
Dim buildingList As Xml.XmlNodeList
Dim root As Xml.XmlElement = globalConfig.DocumentElement
buildingList = root.SelectNodes("/config/buildings/name")
Dim info As Xml.XmlNode
' xml text writer - used for writing for xml document
For Each info In buildingList
If info.InnerText = buildingName Then
info.NextSibling.InnerText = resource
End If
Next
globalConfig.WriteTo(CurDir)
[...]
I shall using XmlDocument.LoadXML...
Matt
|
|
|
|