Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sqlConn.ConnectionString = GetConnString(Database);
- // build query
- string strSQL = @" SELECT [No_] AS [VendorNo],
- LTRIM([Name]) AS [VendorName]
- FROM [********_$Vendor]
- WHERE LEN(RTRIM([Name])) > 0 /* avoid blank names */
- AND [Vendor Posting Group] = 'VEND'
- ORDER BY LTRIM([Name]) ASC; /* LTRIM fixes spaces before name */ ";
- SqlDataAdapter da = new SqlDataAdapter(strSQL, sqlConn);
- DataSet ds = new DataSet();
- da.Fill(ds, "Vendors");
- return (ds);
- }
Add Comment
Please, Sign In to add comment