The following bcp example is from BOL
bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" queryout Authors.txt -c -Sservername -Usa -Ppassword
The above example works fine for me both through the command shell and when I wrap it in a stored procedure and use your...
There are many ways to insert to a text field.
I would probably use ADO/VB to update the field passing the text from the file to a stored procedure variable.
If you want to do the import through SQL then you might want to use BULK INSERT or Data Transformation Services (DTS). The options depend...
Why do you think the field is only 1024 bytes? Have you checked you query analyser Maximum Characters per column setting (Tools:Options:Results). This may be restricting the number of characters you are returning and can view.
Is this what you need?
SELECT
count(datefld) TotalCol,
datepart(hh, datefld) HourCol,
datepart(n, datefld) /30 MinCol
FROM
tablename
GROUP BY
datepart(hh, datefld),
datepart(n, datefld) /30
ORDER BY
datepart(hh, datefld),
datepart(n, datefld) /30
MDA,
Sorry I never did get the code to work. I ended up using trusted connections.
When running the SQLConfigDataSource() function you can use the SQLInstallerError() function to get the reason why the SQLConfigDataSource() failed.
See following link for details...
Hi Stefan
One way to run a VB App from the command shell and return values to the same command shell is to create a ActiveX DLL and use VBScript create an instance of it. You can run the VBScript from the command line using CScript.
Check out...
Hi
I am trying to create a SQL Server DSN using code. I want to create the DSN for a specified server, database, username and password. I can create a DSN using SQLConfigDataSource without specifying a username and password however when I do specify a username and password the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.