hi there, i have this one issue when i try to insert a filename of a image into a access database, it errors saying it cant find the filepath?? is there another setting i need to insert this string?
thanks in advance
my code:
thanks in advance
my code:
VB.NET:
Public Sub imageSave()
Dim x As Integer
Dim ol As String
Dim os As String
Dim fl As String
Dim sm As String
Dim aid As String
aid = "something"
x = image.Count
Dim i As Integer
projectname = "new document"
While i < x
ol = image.Item(i).location().ToString
os = image.Item(i).size().ToString
fl = image.Item(i).ImageLocation().toString
sm = image.Item(i).SizeMode().ToString
aid = image.Item(i).backcolor().ToString
Dim cmd As New OleDb.OleDbCommand("INSERT INTO form (objectLocation,objectSize,fileLocation,sizeMode,animationID) VALUES (@ol,@os,@fl,@sm,@aid)", conn)
cmd.Parameters.AddWithValue("@fo", ol)
cmd.Parameters.AddWithValue("@fn", os)
cmd.Parameters.AddWithValue("@bc", fl)
cmd.Parameters.AddWithValue("@fo", sm)
cmd.Parameters.AddWithValue("@fo", aid)
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
MsgBox("Added Form")
i = i + 1
End While
End Sub