bsr, ds le cadre de la creation d'une application,gestion de scolarite comme projet de fin d'etude j'ai ce probleme lorceque je veux imprimer
j'ai le message suivant
l'acces au chemin d'acces c:\Tromb.xml est refuse
et voila mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 If txtc.Text = "" Then MsgBox("Veuillez choisir une classe SVP", MsgBoxStyle.Information) Else Dim myData As New DataSet Dim cmd As New MySqlCommand Dim myAdapter As New MySqlDataAdapter Dim conn As New MySqlConnection conn.ConnectionString = "server=localhost;" _ & "user id=root;" _ & "pwd=;" _ & "database=emploi" Try cmd.CommandText = "SELECT * from eleve where classe='" & txtc.Text & "'" cmd.Connection = conn myAdapter.SelectCommand = cmd myAdapter.Fill(myData) myData.WriteXml("c:\Tromb.xml", XmlWriteMode.WriteSchema) Tromb1.ShowDialog() Catch ex As Exception MessageBox.Show(ex.Message, "Report could not be created", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End If
Partager