Why wont this work? Im dying over here :P
This is supposed to add info (which i am getting okay from mushclient) to a database. It doesnt. Can someone plllllleeeeaaaaassssseeeeeee tell me why......
Sub GetStuff(gworld As World)
dim item, iteminfo, 'etc... i dim everything
'i have lots of getvariables here usually - you dont need to see this its working fine :)
'the next bit wont work :|
'~~~ADD INFO INTO THE DATABASE~~~'
'this is supposed to open ITEMDB recordset:
Dim Itemdb As Database
Dim RecSet As Recordset
'okay, the db below (newdatabase.mdb) has a table called "items"
'im attempting to open it :)
Set itemdb = OpenDatabase("C:\Program Files\MUSHclient\ishnaf\DBproject\newdatabase.mdb")
Set RecSet = itemdb.OpenRecordset("Items", dbOpenDynaset)
'now im trying to add a record to this record source
With RecSet
'Set it to Add mode
.AddNew
.Fields("Item").Value = Item
.Fields("ItemType").Value = itemtype
.Fields("ItemIs").Value = itemis
.Fields("ForgeLevel").Value = forgelvl
.Fields("DiceNo").Value = diceno
.Fields("DiceSize").Value = dicesize
.Fields("Weight").Value = weight
.Fields("Value").Value = valuee
.Fields("Rent").Value = rent
.Fields("ACApply").Value = acapply
.Fields("Armor").Value = Armor
.Fields("CON").Value = con
.Fields("INTEL").Value = intel
.Fields("WIS").Value = wis
.Fields("DEX").Value = dex
.Fields("CHA").Value = Cha
.Fields("STR").Value = stre
.Fields("Hitroll").Value = hitroll
.Fields("Damroll").Value = damroll
.Fields("maxhit").Value = maxhit
.Fields("maxmana").Value = maxmana
.Fields("Uselevel").Value = uselevel
.Fields("Age").Value = age
'Update it
.Update
'Close it
.Close
End With
Set db = Nothing
'to send something to world to see if the script makes it to here
gworld.Note "The Item Has been added. Perhaps :P"
End Sub
Any ideas? Or am i insane?
This is supposed to add info (which i am getting okay from mushclient) to a database. It doesnt. Can someone plllllleeeeaaaaassssseeeeeee tell me why......
Sub GetStuff(gworld As World)
dim item, iteminfo, 'etc... i dim everything
'i have lots of getvariables here usually - you dont need to see this its working fine :)
'the next bit wont work :|
'~~~ADD INFO INTO THE DATABASE~~~'
'this is supposed to open ITEMDB recordset:
Dim Itemdb As Database
Dim RecSet As Recordset
'okay, the db below (newdatabase.mdb) has a table called "items"
'im attempting to open it :)
Set itemdb = OpenDatabase("C:\Program Files\MUSHclient\ishnaf\DBproject\newdatabase.mdb")
Set RecSet = itemdb.OpenRecordset("Items", dbOpenDynaset)
'now im trying to add a record to this record source
With RecSet
'Set it to Add mode
.AddNew
.Fields("Item").Value = Item
.Fields("ItemType").Value = itemtype
.Fields("ItemIs").Value = itemis
.Fields("ForgeLevel").Value = forgelvl
.Fields("DiceNo").Value = diceno
.Fields("DiceSize").Value = dicesize
.Fields("Weight").Value = weight
.Fields("Value").Value = valuee
.Fields("Rent").Value = rent
.Fields("ACApply").Value = acapply
.Fields("Armor").Value = Armor
.Fields("CON").Value = con
.Fields("INTEL").Value = intel
.Fields("WIS").Value = wis
.Fields("DEX").Value = dex
.Fields("CHA").Value = Cha
.Fields("STR").Value = stre
.Fields("Hitroll").Value = hitroll
.Fields("Damroll").Value = damroll
.Fields("maxhit").Value = maxhit
.Fields("maxmana").Value = maxmana
.Fields("Uselevel").Value = uselevel
.Fields("Age").Value = age
'Update it
.Update
'Close it
.Close
End With
Set db = Nothing
'to send something to world to see if the script makes it to here
gworld.Note "The Item Has been added. Perhaps :P"
End Sub
Any ideas? Or am i insane?