|
-
Apr 3rd, 2002, 09:46 PM
#41
Thread Starter
PowerPoster
At a quick glance i note:
On the delete statement:
1) sql = "DELETE FileInfo.[Comments] FROM FileInfo WHERE FileInfo.[FileName] = '" & selectedFile & "'"
2) Else just do this rst.fields("Comments") = ""
On the Update statement:
1) sql = "UPDATE FileInfo SET Comments = " & "rst.Fields("Comments").AppendChunk strdata " & "WHERE FileInfo.FileName =" & selectedFile
Just those "" could help!
Good luck!
b
-
Apr 3rd, 2002, 10:42 PM
#42
Member
Hi Beacon,
Thank you very much for your help!! with rst.fields("Comments") = "" works!
I did it this way:
strdata = ""
rst.Fields("Comments") = ""
rst.Update
strdata = txtComments.Text
rst.Fields("Comments").AppendChunk strdata
rst.Update
i added these codes before the first strdata:
Set rst = New ADODB.Recordset
sql = "SELECT FileInfo.[Comments] FROM FileInfo WHERE FileInfo.FileName = " & selectedFile
Set rst = cnn.Execute(sql)
and i got this error: "Too few parameters. Expected 1"
What does it mean? I get this error for many other sql SELECT statements and i had to use this kind of code (rst.Open "UserInfo", cnn, adOpenKeyset, adLockPessimistic, adCmdTable) to do the work.
Why does this happen?
-
Apr 3rd, 2002, 10:59 PM
#43
Thread Starter
PowerPoster
it means that the rst expects other parameters.
First i'd say open your recordset up then execute your sql query!
i.e
VB Code:
Set rst = New ADODB.Recordset
sql = "SELECT FileInfo.[Comments] FROM FileInfo WHERE FileInfo.FileName = " & selectedFile
rst.Open "UserInfo", cnn, adOpenKeyset, adLockPessimistic, adCmdText
Set rst = cnn.Execute(sql)
-
Apr 4th, 2002, 12:31 AM
#44
Member
hhmm, i'm still getting the same error when i do this:
rst.Open "FileInfo", cnn, adOpenKeyset, adLockPessimistic, adCmdTable
i don't understand the difference between using adCmdText and adCmdTable.
-
Apr 4th, 2002, 12:52 AM
#45
Thread Starter
PowerPoster
adcmdText allows you use sql statements in your recordset!
Have you set rst = new.adodb.recordset??
Try this:
VB Code:
Set rst = New ADODB.Recordset
rst.Open "SELECT FileInfo.[Comments] FROM FileInfo WHERE FileInfo.FileName = " & selectedFile, cnn, adOpenKeyset, adLockPessimistic, adCmdText
Does that work??
I dont think it likes this:
Set rst = cnn.Execute(sql)
perhaps just cnn.Execute(sql) or rst = cnn.Execute(sql)
-
Apr 4th, 2002, 01:01 AM
#46
Member
I'm still getting the same error at rst.Open statement
-
Apr 4th, 2002, 01:06 AM
#47
Thread Starter
PowerPoster
re-post your rst.open statement and the error now!!
-
Apr 4th, 2002, 01:13 AM
#48
Member
ok, here it goes......
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT FileInfo.[Comments] FROM FileInfo WHERE FileInfo.FileName = " & selectedFile, cnn, adOpenKeyset, adLockPessimistic, adCmdText
Error: "Too few parameters. Expected 1"
Sorry for disturbing you, Beacon.
Thank you for patiently helping me.
-
Apr 4th, 2002, 01:41 AM
#49
Thread Starter
PowerPoster
ahh how'd i miss that!! Trying to do 10 things!
your sql statement is wrong
rst.Open "SELECT FileInfo.[Comments] FROM FileInfo WHERE FileInfo.FileName = '" & selectedFile & "';", cnn, adOpenKeyset, adLockPessimistic, adCmdText
Try that!
later
b
-
Apr 4th, 2002, 02:01 AM
#50
Member
Thank you Beacon!!!!!!!!!!!!!!!!!!!!!!
Thank you very much for your help!!
-
Aug 5th, 2002, 07:06 PM
#51
Lively Member
lol
Hey that was so simple, I was dying to help you out there! Jeez...
But, he's already helped you out superbly well (and this post is quite later on, in respect to this thread date...); so I'll leave ya...
<% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>
-
Sep 27th, 2002, 10:13 AM
#52
Frenzied Member
Streaming...
Hey Beacon,
I was wondering if you ever got around to trying the streaming thing... Not being pushy... I'm just wondering...
squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Jun 12th, 2003, 10:45 AM
#53
Fanatic Member
This looks like the holy grail from where I'm working. I take it it would work for saveing *.doc files to use as file fragments for "slapping" in to blank word files when it comes time for access to create doffing complex word files as an output...?
Is there anything I would need to know, alter, bare in mind while doing this?
-
Oct 19th, 2004, 11:24 AM
#54
New Member
thank you
thank you very much for your information. I am like a baby when it comes to the web or anythng in it. you made things much more easier for me to understand. The emocons? i dont know what they are but i got some clothes with the same logo on it. cool i guess. thanks again
-
Oct 20th, 2004, 05:46 PM
#55
Banned
This is inefficient code.
Why not store the hyperlink in the database and have the image or file on a network resource ?
-
Oct 20th, 2004, 08:44 PM
#56
Frenzied Member
Well that's just a matter of opinion...
What if you don't want the user to have any access to the picture or file except through your program?
BTW... Try to keep posts a little more constructive and don't bash other peoples code.. I'm sure Beacon worked a while on this stuff and I've used it personally.. it's really good and works great...
This is an OLD, VERY OLD thread anyways man...
Good Job again Beacon!
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Oct 20th, 2004, 09:37 PM
#57
Banned
Originally posted by squirrelly1
Well that's just a matter of opinion...
What if you don't want the user to have any access to the picture or file except through your program?
BTW... Try to keep posts a little more constructive and don't bash other peoples code.. I'm sure Beacon worked a while on this stuff and I've used it personally.. it's really good and works great...
This is an OLD, VERY OLD thread anyways man...
Good Job again Beacon!
Squirrelly1
Whose bashing ? Why do programmers not like constructive criticism? Reminds me of the old vb6 wimps who cried when I said code was bad. Good programmers look for efficient methods, coding practices, and styles. No one is bashing, its bad code and it is very inefficient.
Why would you want to show the resource or file from within one app but not another, that makes NO sense.
Doens't matter how old the thread is, I responded to it .
-
Oct 20th, 2004, 09:51 PM
#58
Frenzied Member
What if the file I had stored in the database was confidential or my personal creation and I didn't want someone to have access to it unless they have permission???
To tell someone that their code is inefficient and offer no relative solution is not exactly constructive there bud... Why not just start up your own thread on your method for what you want to do?
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
-
Oct 21st, 2004, 07:56 AM
#59
Banned
Originally posted by squirrelly1
What if the file I had stored in the database was confidential or my personal creation and I didn't want someone to have access to it unless they have permission???
To tell someone that their code is inefficient and offer no relative solution is not exactly constructive there bud... Why not just start up your own thread on your method for what you want to do?
Squirrelly1
Even if it was confidential, you can impose these security entities directly on the resource, in addition read, write, execute.
I
-
Oct 21st, 2004, 07:56 AM
#60
Banned
Originally posted by squirrelly1
What if the file I had stored in the database was confidential or my personal creation and I didn't want someone to have access to it unless they have permission???
To tell someone that their code is inefficient and offer no relative solution is not exactly constructive there bud... Why not just start up your own thread on your method for what you want to do?
Squirrelly1
Even if it was confidential, you can impose these security entities directly on the resource, in addition read, write, execute.
I did offer a solution. Hyperlinks.
-
Oct 21st, 2004, 10:36 AM
#61
Frenzied Member
Well, to each his own I guess... I personally like the code and the idea, but hey... that's probably just me being paranoid that some freak is gonna try and hack the system and take whatever they want (*looks around anxiously*)...
I also think it's pretty neet just to have your software and a database and that's it... not a bunch of pictures, pdf's, whatever...
But like I said, to each his own.
Good luck to all,
Squirrelly1
Now happily married and still crankin' away at the keyboard.  Life is grand for a coder, no?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|