Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
I

iramirezp

@iramirezp
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating multiple sql stored procedures from vb .net
    I iramirezp

    It was a typo in the example I put just to have an idea how I have the stored procedures lines.

    Database database help csharp sharepoint question

  • Creating multiple sql stored procedures from vb .net
    I iramirezp

    Thanks Mark but I have tried that and only works when using the sql editor. I actually had to remove the GO from my other text files (database.txt, tables.txt) in order to work. Thanks, Israel

    Database database help csharp sharepoint question

  • Creating multiple sql stored procedures from vb .net
    I iramirezp

    Hi everyone, I'm creating a database installer where I have some code to create database, tables, stored procedures, etc. I don't have problems when creating the database, tables and inserting required data. My problem is when my code gets to the stored procedures section. Here is what I do: I have different text files (database.txt, tables.txt, insertdata.txt, storeprocedures.txt) where my sql syntax is located. I execute every process/text file using the following: ExecuteSql("master", GetSql("database.txt")) ' Creating 1 database. ExecuteSql("mynewdatabase", GetSql("tables.txt")) ' Creating 15 tables. ExecuteSql("mynewdatabase", GetSql("insertdata.txt")) ' Inserting data to many tables. ExecuteSql("mynewdatabase", GetSql("storeprocedures.txt")) ' Creating 6 stored procedures. Here is part of the error: In exception handler: Incorrect syntax near the keyword 'PROCEDURE'. "This is the second stored procedure because the variables I get below belong to the second one" Must declare the scalar variable "@intVariable1". Must declare the scalar variable "@intVariable1". Must declare the scalar variable "@intVariable1". Must declare the scalar variable "@intVariable1". When trying to create 6 or even 2 stored procedures using the same file ‘storeprocedures.txt' is not possible. If I leave just 1 it works but I really want to keep them together. Creating 15 tables using the same file 'tables.txt' works, inserting data in different tables using the same file 'insertdata.txt' works. This is the general syntax I use: Create Procedure sp_stored1 @intVariablex int As Begin Code End Create Procedure sp_stored2 intVariabley int As Begin Code End .......... .......... .......... Is is possible to create more than 1 stored procedure the way I'm trying to? Do I need to end every stored procedure with specific sql syntax, other than the 'end'? I appreciate your response!!! Thanks, Israel

    Database database help csharp sharepoint question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups