Can yiu explain a little more please? You have a "side" which I assume you mean WEB side? This side can update information and the result is written to an XML document.
Do you want to use Access instead of XM or do you want the XML document to read data from Access?
Yes, I have a Web Side, which can update information shown in a datagrid and written to an XML document. Instead I want the datagrid to be written to an Access file. How do I do that?
To wriet to an Access database from a web page requires the use of some programming language for example ASP/ASP.NET. You cant NOT write to an Access database which is on your local PC, from a web page unless of course the web page is also located on yur own local PC. To write to an Access database from a web page DOES NOT require Access but it deos require that the WEB server supports Access.
I cant teach you how to use Access from a web page but I can give some links.
You can show your code but I dont think it is going to help very much. This category is Access and programming in ASP or what ever isnt really my hot spot.
Anyway, lets have a look at you rcode to see if we can understand what is going on, then we can decide what to do from there!
Dim ObjConn As oledbConnection Dim ObjRs As oledbDataReader Dim ObjCmd As oledbCommand Dim DBPos, Antal, i, SideAntal, TotalPris As Integer Dim CheckOutDate as Date Dim NyAntalSolgt As Integer Dim SQLStr As string Dim strRes, strConn, strSQL, strSti as string Dim objDR as OledbDataReader
Sub Page_Load(sender as object, e as eventargs) If not Page.IsPostback Then EventData.DataSource = LoadMyCalendarData EventData.DataBind() End If End Sub
Protected Function LoadMyCalendarData() As DataSet Dim sourceXML as String = Server.MapPath("MyCalendar.xml") If ( Not File.Exists(sourceXML) ) Then Return Nothing End if
Dim cachedDataSet as DataSet = Session("MyCalendarData") if ( Not cachedDataSet Is Nothing ) Then Return cachedDataSet End if
Dim dataSet As DataSet = New DataSet()
Try dataSet.ReadXml(sourceXML) Session("MyCalendarData") = dataSet Catch e As Exception ErrorMessage.Text = e.Message dataSet = Nothing End Try
Return dataSet End Function
Sub DEDR_Edit(sender as object, e as DataGridCommandEventArgs) EventData.EditItemIndex = CInt(E.Item.ItemIndex) EventData.DataSource = LoadMyCalendarData EventData.DataBind() End Sub
Sub DEDR_Update(sender as object, e as DataGridCommandEventArgs) Dim dataSet as DataSet = LoadMyCalendarData Dim row as Integer = CInt(E.Item.ItemIndex) Dim EditText as textbox
EventData.DataSource = LoadMyCalendarData EventData.DataBind() End Sub
Sub DEDR_Cancel(sender as object, e as DataGridCommandEventArgs) EventData.EditItemIndex = -1 Session("MyCalendarData") = Nothing EventData.DataSource = LoadMyCalendarData EventData.DataBind() End Sub
Sub DEDR_Delete(sender as object, e as DataGridCommandEventArgs) Dim dataSet as DataSet = LoadMyCalendarData Dim row as Integer = CInt(E.Item.ItemIndex)
EventData.DataSource = LoadMyCalendarData EventData.DataBind() End Sub
Sub DEDR_Add(sender as object, e as EventArgs) Dim dataSet as DataSet = LoadMyCalendarData Dim newRow as DataRow newRow = dataSet.Tables(0).NewRow() newRow.Item("EventDate") = "" newRow.Item("ShortDesc") = "" newRow.Item("DetailDesc") = "" newRow.Item("StartTime") = "" newRow.Item("EndTime") = "" dataSet.Tables(0).Rows.Add(newRow)
As I susppected, I dont really understand exactly what is happening.
You need to be able to read/write to an Access database before you can do anything. So I would suggest you make a very simple web application using the links I gave and go from there. It would take me hours if I were to try and convert your code for you. You may also get further help in the ASP category
Har du proevet at importere dine eksisterende XML-filer til Access foerst og fremmest? Derefter skal du have oprettet en connection til db'en som Terry siger. Strengt taget akn du bibeholde dine XML-filer som linkede objekter i databasen, hvor det eneste DB goer er at query forskellige samlinger af xml-filer.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.