Forum Replies Created

Viewing 15 posts - 3,481 through 3,495 (of 13,460 total)

  • RE: Connecting to SQL Server from a Visual Studio 2012 Express Class

    here's a basic example for connecting, does this help?

    'form a command that waits longer than 30 seconds for testing

    Dim sqlcmd As String...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Pass a string into SP and parse on space

    Brandie Tarvin (5/10/2013)


    j2cagle (5/10/2013)


    Yes, Say Hey Kid, it's very similar to what you posted. I agree with a previous post...the real issue is in the VB code. However, I wanted...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to get a variable into my query from a WITH statement

    it's just a syntax issue, where you are doubling up the SET and SELECT unnecessarily;

    I think you want to simply assign the variable directly in the SELECT:

    SELECT

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Pass a string into SP and parse on space

    in both vb6 or VB.Net, you can split the string into elements, and take the first element, or you can use the built in string functions.

    'VB.Net: both return "ABC"

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Simple 'front ends' for non-developer?!

    Here's another idea I had put together a simple Reporting grid app for our end users;

    it's a windows app featuring the DevExpress Report Grid;

    on the left, it has a list...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SSMS question - Saving Auto Recovery Information...

    for SQL 2008, I know there's nothing in the GUI to help.

    there's registry keys here which seem to allow you to enable it or disable it, but i don't remember...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to raise alert based on rowcount in temp table

    well if you have a hardcoded list, you could modify it like this:

    IF EXISTS(SELECT 1 FROM #Results

    WHERE Login =...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to raise alert based on rowcount in temp table

    here's a quick adaptation of another post i did for almost the same thing;

    you'd need to tweak the mail settings, assuming you have db mail all set up:

    --2005/08

    IF (SELECT...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Deny login while connecting to Sql server

    modified from a similar post on the same subject, i think this would do exactly what you are asking:

    --Prevent access from SSMS

    --drop TRIGGER logon_trigger_not_from_SSMS on all server

    CREATE TRIGGER logon_trigger_not_from_SSMS...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Create BAT File and execute the same in Trigger

    mail2payan (5/9/2013)


    I am getting following result of the T-SQL

    IDTheOutput

    1nt authority\system

    2NULL

    3NULL

    4Access is denied.

    5NULL

    that confirms my thoughts on permissions to the shared folder...

    when you access any resource OUTSIDE of SQL server, like...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Create BAT File and execute the same in Trigger

    I would not do file operations in a trigger, but what you have looks like it will basically work.

    I think the issue might be no permissions for SQL server to...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can I keep x number of iterations in XP_CMDSHELL

    well, you can get the quick list for bcp (or sqlcmd, it's newer, updated replacement)

    by running it from the command line window with the /? flag

    bcp /?

    sqlcmd /?

    for the basic...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: management Studio

    a linked server is a server object in master.sys.servers...so once you connect with SSMS, whether it's local or remote instance of SQL, you can create or use linked servers...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can I keep x number of iterations in XP_CMDSHELL

    in that case, i'd change the name of the file to something that was generated to represent teh actual date, like this: (but why only for Wilson?)

    --20130508-16-23-28-040.xml

    SELECT REPLACE(CONVERT(VARCHAR(35),getdate(),112) + '-'...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can I keep x number of iterations in XP_CMDSHELL

    is the question "how do i run this query every x minutes?"

    the answer is to create a scheduled job in the SQL Server Agent, that reccurs every hour or whatever...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 3,481 through 3,495 (of 13,460 total)