asp.net - loop throught data in DSN connection -


i set netsuite (our business management program) web service , odbc connection. configure odbc in server connect web service via system dsn , file dsn. tested connection user id , password , worked. in vs2013 asp.net (vb) page, can't loop through records in table:

dim cn odbcconnection cn = new odbcconnection("driver=cdata odbc driver netsuite 2015;dsn=odbc1;uid=myemail.com;pwd=mypassword") cn.open()  dim cmdstring33 string = "select * customlist" dim cmd33 new odbccommand(cmdstring33, cn) dim rds33 = cmd33.executereader 'while rds33.read '    response.write(rds33("internalid")) 'end while cn.close() 

but following error: error [hy000] account must specified in order login netsuite. in "dim rds33 = cmd33.executereader" account works when test connection in odbc administration window

what doing wrong? advice

with odbc .net managed provider, should either specify dsn wish use:

cn = new odbcconnection("dsn=odbc1") 

or should specify odbc driver , connection string:

cn = new odbcconnection("driver=cdata odbc driver netsuite 2015;accountid=...;password=*****;roleid=3;user=...;version=2013_1") 

where fill in connection string values based on documentation provided driver.

*note our drivers (cdata software) don't require user/password default, don't need specify uid or password when using dsn.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -