Ask a Question related to ASP Database, Design and Development.
-
ThunderMusic #1
Problem reading a blob field in oracle (no, just converting it)
Hi,
I read a blob field from oracle using the
recordser("FIELD").GetChunk....... I get the good value out of it. The
problem is that this data must be used as text, so I want to convert it, but
I always get a Type mismatch (I tought there was no types in asp) Here is
the code I use to convert it, it fails on line 10:
Public Sub ConvertBytesToString(ByRef abBytes(), ByRef strString)
Dim lCpt
Dim bTempChar
Dim NbChars
NbChars = UBound(abBytes) +1
strString = ""
For lCpt = 0 To NbChars - 1
' It fails right after this line.
bTempChar = chr(abBytes(lCpt))
'Do not convert chr(0) if it's the last char
If (abBytes(lCpt) = 0) And (lCpt = (NbChars - 1)) Then
'Do Nothing
Else
strString = strString & CStr(bTempChar)
End If
Next 'lCpt
End Sub
Can someone point me what is wrong and what could be a solution?
thanks
ThunderMusic
ThunderMusic Guest
-
How to Display A Stored TIF Blob field in SQL Server
Does anybody know how to display a TIF blob field in SQL Server? :confused; -
insert blob in oracle (CF_SQL_BLOB) not working
I've the following code that is supposed to upload an image as a BLOB in the oracle 9i db (I am using cf mx 7) <cffile action='readbinary'... -
Setting the value of an Informix v7.3 BLOB field using ADO, VFP and OLEDB
Hi everyone, I'm trying to replace an Informix v7.3 BLOB field in an existing record with a .PDF file and it's giving me fits! I've adapted the... -
PHP + Firebird problem with blob field size
Hello people, First: sorry my weak english. I´m brazilian. I have the fallow blob field in my database: CREATE DOMAIN DM_TEXT AS BLOB SUB_TYPE 1... -
How to Insert documents to a BLOB field
Hi, I have an Access Front-End application and an Oracle Back-End for my tables. I have a BLOB field in one of the tables. I use Access form to... -
Ray at #2
Re: Problem reading a blob field in oracle (no, just converting it)
On what line?
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
news:ekInfUmYDHA.1644@TK2MSFTNGP10.phx.gbl...>> I always get a Type mismatch
Ray at Guest
-
ThunderMusic #3
Re: Problem reading a blob field in oracle (no, just converting it)
come on, read the code, it's written. it fails on bTempChar =
chr(abBytes(lCpt))
Public Sub ConvertBytesToString(ByRef abBytes(), ByRef strString)
Dim lCpt
Dim bTempChar
Dim NbChars
NbChars = UBound(abBytes) +1
strString = ""
For lCpt = 0 To NbChars - 1
' It fails right after this line.
bTempChar = chr(abBytes(lCpt))
'Do not convert chr(0) if it's the last char
If (abBytes(lCpt) = 0) And (lCpt = (NbChars - 1)) Then
'Do Nothing
Else
strString = strString & CStr(bTempChar)
End If
Next 'lCpt
End Sub
thanks
ThunderMusic
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:OYDrk%23mYDHA.1680@tk2msftngp13.phx.gbl...> On what line?
>
> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> news:ekInfUmYDHA.1644@TK2MSFTNGP10.phx.gbl...>> >> I always get a Type mismatch
>
ThunderMusic Guest
-
ThunderMusic #4
Re: Problem reading a blob field in oracle (no, just converting it)
oh oh... the problem is bigger than I thought. event if I do this, it
fails:
dim value
value = abBytes(lcpt) 'It fails on this line with a type mismatch
Would it be possible that the array is just not passed at all in parameter?
Would there be another way to pass it?
thanks
ThunderMusic
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
news:%23ZGuErnYDHA.1748@TK2MSFTNGP12.phx.gbl...your> ok, I get a type mismatch anyway. I remarked all the lines within the for
> and put your line and I get a type mismatch on your line. if I replacein> line by response.write(lcpt), I get the lcpt values (that's ok), so the
> length of my thing is not 0. technically the values it should get from the
> db is "8987 MB" that's what is contained into the abBytes (as a string
> converted to blob, then read by GetChunk).
>
> What's happening with that? because when I try to read it in VB, with
> exactly the same sub as the first one posted, it shows perfectly. but notmessage> asp (probably due to the fact that there is not types).
>
> thanks, any other solution?
>
> ThunderMusic
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:ut$7RinYDHA.2236@TK2MSFTNGP10.phx.gbl...> > Does your abBytes array contain any non-numeric values? See the line I
> > added below:
> >
> > "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> > news:eSJ0yBnYDHA.2464@TK2MSFTNGP09.phx.gbl...> > RESPONSE.WRITE ABBYTES(LCPT) & " - "> > > come on, read the code, it's written. it fails on bTempChar =
> > > chr(abBytes(lCpt))
> > >
> > > Public Sub ConvertBytesToString(ByRef abBytes(), ByRef strString)
> > > Dim lCpt
> > > Dim bTempChar
> > > Dim NbChars
> > >
> > > NbChars = UBound(abBytes) +1
> > > strString = ""
> > > For lCpt = 0 To NbChars - 1
> > > ' It fails right after this line.> > > bTempChar = chr(abBytes(lCpt))
> > >
> > > 'Do not convert chr(0) if it's the last char
> > > If (abBytes(lCpt) = 0) And (lCpt = (NbChars - 1)) Then
> > > 'Do Nothing
> > > Else
> > > strString = strString & CStr(bTempChar)
> > > End If
> > > Next 'lCpt
> > > End Sub
> > >
> > > thanks
> > >
> > > ThunderMusic
> > >
> > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in>> >> > > news:OYDrk%23mYDHA.1680@tk2msftngp13.phx.gbl...
> > > > On what line?
> > > >
> > > > "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> > > > news:ekInfUmYDHA.1644@TK2MSFTNGP10.phx.gbl...
> > > > >> I always get a Type mismatch
> > > >
> > > >
> > >
> > >
> >
>
ThunderMusic Guest
-
Ray at #5
Re: Problem reading a blob field in oracle (no, just converting it)
abBytes is supposed to be an array. So, is it actually equivalent to
Array("8","9","8","7"," ","M","B")?
If so, you will get a type mismatch when you try to do chr on " ".
What does this code do?
Public Sub TEST(ByRef abBytes(), ByRef strString)
Dim lCpt
Dim bTempChar
Dim NbChars
NbChars = UBound(abBytes) +1
strString = ""
For lCpt = 0 To NbChars - 1
RESPONSE.WRITE ABBYTES(LCPT) & "<BR>"
Next 'lCpt
End Sub
If you get a type mismatch on that, something's up with your array. BTW,
why are you using ByRef on the array?
Ray at work
"ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
news:%23ZGuErnYDHA.1748@TK2MSFTNGP12.phx.gbl...your> ok, I get a type mismatch anyway. I remarked all the lines within the for
> and put your line and I get a type mismatch on your line. if I replacein> line by response.write(lcpt), I get the lcpt values (that's ok), so the
> length of my thing is not 0. technically the values it should get from the
> db is "8987 MB" that's what is contained into the abBytes (as a string
> converted to blob, then read by GetChunk).
>
> What's happening with that? because when I try to read it in VB, with
> exactly the same sub as the first one posted, it shows perfectly. but notmessage> asp (probably due to the fact that there is not types).
>
> thanks, any other solution?
>
> ThunderMusic
>
>
> "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> news:ut$7RinYDHA.2236@TK2MSFTNGP10.phx.gbl...> > Does your abBytes array contain any non-numeric values? See the line I
> > added below:
> >
> > "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> > news:eSJ0yBnYDHA.2464@TK2MSFTNGP09.phx.gbl...> > RESPONSE.WRITE ABBYTES(LCPT) & " - "> > > come on, read the code, it's written. it fails on bTempChar =
> > > chr(abBytes(lCpt))
> > >
> > > Public Sub ConvertBytesToString(ByRef abBytes(), ByRef strString)
> > > Dim lCpt
> > > Dim bTempChar
> > > Dim NbChars
> > >
> > > NbChars = UBound(abBytes) +1
> > > strString = ""
> > > For lCpt = 0 To NbChars - 1
> > > ' It fails right after this line.> > > bTempChar = chr(abBytes(lCpt))
> > >
> > > 'Do not convert chr(0) if it's the last char
> > > If (abBytes(lCpt) = 0) And (lCpt = (NbChars - 1)) Then
> > > 'Do Nothing
> > > Else
> > > strString = strString & CStr(bTempChar)
> > > End If
> > > Next 'lCpt
> > > End Sub
> > >
> > > thanks
> > >
> > > ThunderMusic
> > >
> > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in>> >> > > news:OYDrk%23mYDHA.1680@tk2msftngp13.phx.gbl...
> > > > On what line?
> > > >
> > > > "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> > > > news:ekInfUmYDHA.1644@TK2MSFTNGP10.phx.gbl...
> > > > >> I always get a Type mismatch
> > > >
> > > >
> > >
> > >
> >
>
Ray at Guest
-
ThunderMusic #6
Re: Problem reading a blob field in oracle (no, just converting it)
il semblerait que asp ne le voit pas de cette manière. ce qui est contenu
dans le blob c'est du binaire (binary large object) donc, 0x38, 0x39, 0x38,
0x37, 0x20, 0x4D, 0x42 ou encore 38393837204D42. c'est la représentation. Or
Asp ne semble pas voir que c'est une string puisque même si je fais
response.write(monrecordset.field("monchampblob") il me donne un type
mismatch. résultat, j'ai l'impression que c'est impossible d'afficher un
blob en asp lorsque ce blob contient du texte.
à ceux qui connaissent bien Oracle, serait-ce t'il plus approprié d'utilise
un clob plutot qu'un blob?
merci
ThunderMusic
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:e$nF$znYDHA.2032@TK2MSFTNGP10.phx.gbl...for> abBytes is supposed to be an array. So, is it actually equivalent to
> Array("8","9","8","7"," ","M","B")?
>
> If so, you will get a type mismatch when you try to do chr on " ".
>
> What does this code do?
>
> Public Sub TEST(ByRef abBytes(), ByRef strString)
> Dim lCpt
> Dim bTempChar
> Dim NbChars
>
> NbChars = UBound(abBytes) +1
> strString = ""
> For lCpt = 0 To NbChars - 1
> RESPONSE.WRITE ABBYTES(LCPT) & "<BR>"
> Next 'lCpt
> End Sub
>
>
> If you get a type mismatch on that, something's up with your array. BTW,
> why are you using ByRef on the array?
>
> Ray at work
>
>
>
>
>
> "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> news:%23ZGuErnYDHA.1748@TK2MSFTNGP12.phx.gbl...> > ok, I get a type mismatch anyway. I remarked all the lines within thethe> your> > and put your line and I get a type mismatch on your line. if I replace> > line by response.write(lcpt), I get the lcpt values (that's ok), so the
> > length of my thing is not 0. technically the values it should get fromnot> > db is "8987 MB" that's what is contained into the abBytes (as a string
> > converted to blob, then read by GetChunk).
> >
> > What's happening with that? because when I try to read it in VB, with
> > exactly the same sub as the first one posted, it shows perfectly. butI> in> > asp (probably due to the fact that there is not types).
> >
> > thanks, any other solution?
> >
> > ThunderMusic
> >
> >
> > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
> > news:ut$7RinYDHA.2236@TK2MSFTNGP10.phx.gbl...> > > Does your abBytes array contain any non-numeric values? See the line> message> > > added below:
> > >
> > > "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> > > news:eSJ0yBnYDHA.2464@TK2MSFTNGP09.phx.gbl...
> > > > come on, read the code, it's written. it fails on bTempChar =
> > > > chr(abBytes(lCpt))
> > > >
> > > > Public Sub ConvertBytesToString(ByRef abBytes(), ByRef strString)
> > > > Dim lCpt
> > > > Dim bTempChar
> > > > Dim NbChars
> > > >
> > > > NbChars = UBound(abBytes) +1
> > > > strString = ""
> > > > For lCpt = 0 To NbChars - 1
> > > > ' It fails right after this line.
> > > RESPONSE.WRITE ABBYTES(LCPT) & " - "
> > > > bTempChar = chr(abBytes(lCpt))
> > > >
> > > > 'Do not convert chr(0) if it's the last char
> > > > If (abBytes(lCpt) = 0) And (lCpt = (NbChars - 1)) Then
> > > > 'Do Nothing
> > > > Else
> > > > strString = strString & CStr(bTempChar)
> > > > End If
> > > > Next 'lCpt
> > > > End Sub
> > > >
> > > > thanks
> > > >
> > > > ThunderMusic
> > > >
> > > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in>> >> > > > news:OYDrk%23mYDHA.1680@tk2msftngp13.phx.gbl...
> > > > > On what line?
> > > > >
> > > > > "ThunderMusic" <NOdlatulippe@teldig.comSPAM> wrote in message
> > > > > news:ekInfUmYDHA.1644@TK2MSFTNGP10.phx.gbl...
> > > > > >> I always get a Type mismatch
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
ThunderMusic Guest



Reply With Quote

