NBS Posted November 13, 2008 Report Share Posted November 13, 2008 Sveiki, man ir šāds kods: http://paste.php.lv/8405?lang=asp Kas dara visādas foršas lietas, bet tas nebūtu tik svarīgi. Neizprotu kāpēc nestrādā man 46 rindiņa. SQL Analyzerā strādā šī lieta, bet VBScriptā nē :( Kļūdu nekādu nav nekas tāds vienkārši nedefinējas man šis mainīgais. Izpalīdziet, lūdzu. Link to comment Share on other sites More sharing options...
Delfins Posted November 13, 2008 Report Share Posted November 13, 2008 select @@identity as NEWID x = exe("NEWID") Link to comment Share on other sites More sharing options...
NBS Posted November 14, 2008 Author Report Share Posted November 14, 2008 select @@identity as NEWID x = exe("NEWID") Meiģināju jau, diemžēl, nepalīdz :( Link to comment Share on other sites More sharing options...
Aleksejs Posted November 14, 2008 Report Share Posted November 14, 2008 Nestrādā ar kādu kļūdas paziņojumu, vai nestrādā un viss? Link to comment Share on other sites More sharing options...
NBS Posted November 14, 2008 Author Report Share Posted November 14, 2008 Nestrādā ar kādu kļūdas paziņojumu, vai nestrādā un viss? Kļūda ir šāda: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Buildings_streets'. The conflict occurred in database 'sbastmc_test', table 'streets', column 'streetID'. /tasks/fastnet_ethernet.asp, line 58 Link to comment Share on other sites More sharing options...
Aleksejs Posted November 14, 2008 Report Share Posted November 14, 2008 Nu, manuprāt tātad problēma nav visa r to select identity, bet gan ar 49 rindiņu: query = "INSERT INTO building_net_prodcat_links (build_id, net_id, prodcat_id, uid, uptime) VALUES ('"& identity &"', '58', '3', '327', GETDATE())" Link to comment Share on other sites More sharing options...
NBS Posted November 14, 2008 Author Report Share Posted November 14, 2008 Nu, manuprāt tātad problēma nav visa r to select identity, bet gan ar 49 rindiņu:query = "INSERT INTO building_net_prodcat_links (build_id, net_id, prodcat_id, uid, uptime) VALUES ('"& identity &"', '58', '3', '327', GETDATE())" Nu jā, bet šajā rindā tieši arī ir "identity", kas ir tukšs. Link to comment Share on other sites More sharing options...
Delfins Posted November 14, 2008 Report Share Posted November 14, 2008 tad taisi pārbaudes... INSERT... IF identity IS NULL OR "" { throw error("sux"); } Link to comment Share on other sites More sharing options...
NBS Posted November 14, 2008 Author Report Share Posted November 14, 2008 tad taisi pārbaudes... INSERT... IF identity IS NULL OR "" { throw error("sux"); } Izpildās, bet ievada identify kā 0 :( Un man tas neder. Link to comment Share on other sites More sharing options...
NBS Posted November 14, 2008 Author Report Share Posted November 14, 2008 Ir kādam kādas idejas/ieteikumi ? :( Link to comment Share on other sites More sharing options...
NBS Posted November 14, 2008 Author Report Share Posted November 14, 2008 Atrisināju savu problēmu. Izselektējot ar WHERE no iepriekšējā mainīgā un ieguvu savus ID, kurus vajadzēja. Paldies, visiem, kas palīdzēja. Kpc nestrādāja IDENTITY nav ne jausmas. Link to comment Share on other sites More sharing options...
Recommended Posts