Fault in SQL-string 
Author Message
 Fault in SQL-string

Hi,

Maybe anyone for assistance?

I have programmed a SQL-string in a module, but there seems to be a fault somewhere in the join-statement, only I can't find it. Here's the string:

 strSQLb = "SELECT Cursus.NaamCursus, [Syntess versie].SyntessVersie, Relatie.NUMMER, Relatie.TITEL," & _
            " Relatie.NAAM, Relatie.ADRES, Relatie.POSTCODE, Relatie.PLAATS, Relatie.LAND, Relatie.TITEL2," & _
            " Relatie.NAAM2, Relatie.ADRES2, Relatie.POSTCODE2, Relatie.PLAATS2, Relatie.LAND2, Cursusdata.GeplandeDatum," & _
            " Cursusdata.[2eCursusdag], CursusdagPlanning.NaamDeelnemer FROM Relatie, Cursus, Cursusdata," & _
            " Cursusdagplanning, [Syntess Versie] INNER JOIN (([Syntess versie] INNER JOIN (Cursus INNER JOIN" & _
            " Cursusdata ON Cursus.CursusID = Cursusdata.CursusID) ON [Syntess versie].VersieID" & _
            " = Cursus.SyntessVersieID) INNER JOIN CursusdagPlanning ON Cursusdata.CursusDatumID" & _
            " = CursusdagPlanning.CursusDatumID) ON Relatie.RelatieID = CursusdagPlanning.RelatieID"

I'll be thankful four your input.

Hans



Sun, 18 Jan 2004 03:27:21 GMT  
 Fault in SQL-string
if you have it spread over multiple lines, don't forget you need an
'_' after each of the '&' symbols...

ie...

strSQL = "Blah blah blah " & _
"next line of code dsjlsd " & _
"final line kfdjdkjfdk"

r


Quote:
> Hi,

> Maybe anyone for assistance?

> I have programmed a SQL-string in a module, but there seems to be a
> fault somewhere in the join-statement, only I can't find it. Here's the
> string:

>  strSQLb = "SELECT Cursus.NaamCursus, [Syntess versie].SyntessVersie,
> Relatie.NUMMER, Relatie.TITEL," &  
>             " Relatie.NAAM, Relatie.ADRES, Relatie.POSTCODE,
> Relatie.PLAATS, Relatie.LAND, Relatie.TITEL2," &  
>             " Relatie.NAAM2, Relatie.ADRES2, Relatie.POSTCODE2,
> Relatie.PLAATS2, Relatie.LAND2, Cursusdata.GeplandeDatum," &  
>             " Cursusdata.[2eCursusdag], CursusdagPlanning.NaamDeelnemer
> FROM Relatie, Cursus, Cursusdata," &  
>             " Cursusdagplanning, [Syntess Versie] INNER JOIN (([Syntess
> versie] INNER JOIN (Cursus INNER JOIN" &  
>             " Cursusdata ON Cursus.CursusID = Cursusdata.CursusID) ON
> [Syntess versie].VersieID" &  
>             " = Cursus.SyntessVersieID) INNER JOIN CursusdagPlanning
> ON Cursusdata.CursusDatumID" &  
>             " = CursusdagPlanning.CursusDatumID) ON Relatie.RelatieID
> = CursusdagPlanning.RelatieID"

> I'll be thankful four your input.

> Hans

> --



Sun, 18 Jan 2004 12:28:48 GMT  
 Fault in SQL-string
I doesn't show in the message, but they're there allright.
AC claims there's a problem with either the FROM statement or the JOIN
statement.
I think I have solved the FROm statement by inserting all tables required
(although querydesign does not!). Then I'm left with the JOIN statement, in
which I can't a fault.

Thanks anyway for checking.

Hans



Quote:
> if you have it spread over multiple lines, don't forget you need an
> '_' after each of the '&' symbols...

> ie...

> strSQL = "Blah blah blah " & _
> "next line of code dsjlsd " & _
> "final line kfdjdkjfdk"

> r



Mon, 19 Jan 2004 01:37:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Page Fault in DAO350.DLL in VB5 with SQL 7.0

2. DAO350.DLL page fault error - VB5 odbc connection to local SQL Server7

3. Page Fault in DAO350.DLL in VB5 with SQL 7.0

4. Invalid Page Fault when connect to SQL Server 2000

5. CR7 SQL/ODBC causes CRW32 invalid page fault

6. dao & sql 7 page fault

7. Page Fault in DAO350.DLL in VB5 with SQL 7.0

8. a SQL string question

9. Sql string to Saved Query

10. Recordset = SQL String

11. Recordset = SQL string

12. converting QBE Sql string to Where

 

 
Powered by phpBB® Forum Software